[This is preliminary documentation and is subject to change.]
Gets or Sets a T object at a particular numerical position in the
collection.
Declaration Syntax
C# |
public T this[ int index ] { get; set; }
Parameters
- index (Int32)
- The position in the collection to get or set the object.
Remarks
When setting an object at a particular position, if the position is held by an existing object, then that object is removed from the collection first (and eventually deleted from persistent storage), and the new one then added. A null value may be set.
If you set an object using this indexer in an ordered collection, then the Order property of the new element is set to the given index.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | Thrown if you set an object
which is invalid (Persistent.IsInvalid returns
true). |