[This is preliminary documentation and is subject to change.]
This ensures that the given object's index entries are up to date
in the IndexedList.
Declaration Syntax
C# |
public bool Reindex( T obj )
Parameters
- obj (T)
- The object to re-index
Return Value
True if the object was re-indexed successfully, false if the
indexing could not be performed because at least one key value was already
taken by another object in the list.
Remarks
The object is re-indexed for any index which has been created, but does not create any indexes which do not yet exist. If the object is not in the list, an exception is thrown. If an index cannot be updated because the key is already taken, then this method returns false. In this case, the object remains in the index with its original key.
The programmer must ensure that the key property is changed to a unique key and the Reindex method reapplied.
Exceptions
Exception | Condition |
---|---|
ArgumentException | Thrown if the given object is not in
the collection |