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

Insert a new property to the container.

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

Syntax

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

Parameters

newIndex
Int32
The position at which the new property is inserted in the container.
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 - obviously it must be possible to cast the value to this type.
value
Object
The actual value to insert into the container.
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..::ArgumentOutOfRangeException Thrown if newIndex is smaller than 0 and or greater than the current length of the container.
System..::ArgumentException Thrown if a property with the given name already exists in the container.

See Also