|
Enhanced C#
Loyc library documentation
|
This interface is the counterpart to IListSource{T} for lists whose minimum index is not (necessarily) zero. More...
This interface is the counterpart to IListSource{T} for lists whose minimum index is not (necessarily) zero.
Be careful not to write a loop that relies on ICount.Count or starts at zero! You must always loop from Min to Max, like so:
Properties | |
| int | Min [get] |
| Returns the minimum valid index in the collection. More... | |
| int | Max [get] |
| Returns the maximum valid index in the collection. More... | |
Properties inherited from Loyc.Collections.IIndexed< in K, out V > | |
| V | this[K key] [get] |
| Gets the value associated with the specified key. More... | |
Public Member Functions | |
| IListSource< T > | Slice (int start, int count=int.MaxValue) |
| Returns a sub-range of this list. More... | |
Public Member Functions inherited from Loyc.Collections.ITryGet< in K, out V > | |
| V | TryGet (K key, out bool fail) |
| Gets the item for the specified key or index, and does not throw an exception on failure. More... | |
| IListSource<T> Loyc.Collections.INegListSource< out T >.Slice | ( | int | start, |
| int | count = int.MaxValue |
||
| ) |
Returns a sub-range of this list.
Implemented in Loyc.Collections.NegListSlice< T >, Loyc.Collections.NegListSlice< T >, Loyc.Collections.NegListSlice< T >, Loyc.Collections.NegList< T >, Loyc.Collections.NegListSource< T >, and Loyc.Collections.InternalDArray< T >.
|
get |
Returns the maximum valid index in the collection.
Count must equal Max-Min+1. If Count is 0, Max = Min-1
|
get |
Returns the minimum valid index in the collection.
1.8.7