| GameObjectCreatePropertyT Method |
Defines a game object property.
Namespace: DigitalRune.GameAssembly: DigitalRune.Game (in DigitalRune.Game.dll) Version: 1.4.0.0 (1.4.0.14427)
Syntax public static GamePropertyMetadata<T> CreateProperty<T>(
string name,
string category,
string description,
T defaultValue
)
Public Shared Function CreateProperty(Of T) (
name As String,
category As String,
description As String,
defaultValue As T
) As GamePropertyMetadata(Of T)
public:
generic<typename T>
static GamePropertyMetadata<T>^ CreateProperty(
String^ name,
String^ category,
String^ description,
T defaultValue
)
static member CreateProperty :
name : string *
category : string *
description : string *
defaultValue : 'T -> GamePropertyMetadata<'T>
Parameters
- name
- Type: SystemString
The name. - category
- Type: SystemString
The category. - description
- Type: SystemString
The description. - defaultValue
- Type: T
The default value.
Type Parameters
- T
- The type of the property value.
Return Value
Type:
GamePropertyMetadataTThe property metadata.
Exceptions Remarks
Game object properties must be defined using this method before they can be used. Properties
are identified by name and type. If a property with the given name
and type T has already been defined, the metadata of the existing
property is returned and the other parameters (category,
description and defaultValue) are ignored!
See Also