Click or drag to resize

INamedIndexer.Item Property

X#
Get/Set array elements with a ZERO based array index.

Namespace:  XSharp
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
PROPERTY SELF[
	index AS LONG,
	name AS STRING
] AS USUAL GET SET 

Parameters

index
Type: Long
This indexer is ZERO based, however in your PRG code you can use ONE based array indices. The compiler will recognize that this property is part of a type that implements a special interface and will subtract one from the indexes, unless the /az compiler option is enabled.
name
Type: String
Name of the property from the element stored in the location index. If the element implements IIndexedProperties, then the indexer with a string parameter on this element will be called. Otherwise the runtime will use reflection to find the field or property on the element and return its value

Property Value

Type: Usual
Remarks
In your PRG code you can assess the elements with a ONE based index. The compiler will recognize that this property is part of a type that implements a special interface and will subtract one from the indexes, unless the /az compiler option is enabled.
See Also