IndexCollectionFromArray Method (Int32, Boolean) |
Namespace: Novacta.Analytics
Exception | Condition |
---|---|
ArgumentNullException | indexes is null. |
ArgumentException |
The Length of indexes is zero. -or- indexes contains a negative element. |
The FromArray(Int32, Boolean) method prevents the copy of the elements in indexes before instantiation if copyIndexes evaluates to false: the returned IndexCollection instance will use a direct reference to indexes to manipulate its indexes.
Caution |
---|
This method is intended for advanced users and must always be used carefully. If the value of copyIndexes is false, do not use this method if you do not have complete control of the indexes array. Once the array is passed to the method as an argument, it must be treated as a read-only object outside the returned instance: you can set elements via the IndexCollection API, but you shouldn't manipulate its entries via a direct reference to indexes: otherwise, the behavior of the returned IndexCollection instance must be considered as undefined and almost surely prone to errors. |