Click or drag to resize
DigitalRuneGameObjectCreatePropertyT Method
Defines a game object property.

Namespace: DigitalRune.Game
Assembly: 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
)

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: GamePropertyMetadataT
The property metadata.
Exceptions
ExceptionCondition
ArgumentNullExceptionname is .
ArgumentExceptionname must not be an empty string.
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