[This is preliminary documentation and is subject to change.]

Add a new property to the container.

Namespace: Spielwerke.Data
Assembly:  Spielwerke.Data (in Spielwerke.Data.dll)
Version: 1.0.2761.41972

Syntax

C#
PropertyHandle Add(
	string propName,
	Type propertyType,
	Object value,
	params Attribute[] attributes
)
Visual Basic (Declaration)
Function Add ( _
	propName As String, _
	propertyType As Type, _
	value As Object, _
	ParamArray attributes As Attribute() _
) As PropertyHandle
Visual C++
PropertyHandle Add (
	String^ propName, 
	Type^ propertyType, 
	Object^ value, 
	... array<Attribute^>^ attributes
)

Parameters

propName
String
The name to be used for the property inserted, if a name is necessary. This is not the name the user sees, the user name is set via the IDisplayLabelAttribute in the itself.
propertyType
Type
The type used for the property itself.
value
Object
The actual value to insert into the container.Can be null.
attributes
array<Attribute>[]()
An array of attributes to be attached to the property - can be null.

Return Value

The handle to the new property

Exceptions

ExceptionCondition
System..::InvalidCastException Thrown if the value cannot be cast to propertyType.
System..::ArgumentException Thrown if a property with the given name already exists in the container.

See Also