Enhanced C#
Language of your choice: library documentation
|
Helper struct. A sequence that stores one value, but acts like a list in which that value is repeated a specified number of times. Returned from ListExt.Repeat<T>(T, int). More...
Helper struct. A sequence that stores one value, but acts like a list in which that value is repeated a specified number of times. Returned from ListExt.Repeat<T>(T, int).
Public fields | |
int | _count |
T | _value |
Properties | |
int | Count [get] |
T | this[int index] [get] |
T IList< T >. | this[int index] [get, set] |
bool ICollection< T >. | IsReadOnly [get] |
bool | IsEmpty [get] |
T | Last [get] |
T | First [get] |
Properties inherited from Loyc.Collections.IIsEmpty | |
bool | IsEmpty [get] |
Public Member Functions | |
Repeated (T value, int count) | |
T | TryGet (int index, out bool fail) |
int | IndexOf (T item) |
IRange< T > IListSource< T >. | Slice (int start, int count) |
Slice_< T > | Slice (int start, int count) |
void IList< T >. | Insert (int index, T item) |
void IList< T >. | RemoveAt (int index) |
void ICollection< T >. | Add (T item) |
void ICollection< T >. | Clear () |
void ICollection< T >. | CopyTo (T[] array, int arrayIndex) |
Copies the elements of the collection to an Array, starting at a particular array index. More... | |
void ICollectionSource< T >. | CopyTo (T[] array, int arrayIndex) |
Copies the elements of the collection to an Array, starting at a particular array index. More... | |
bool ICollection< T >. | Remove (T item) |
bool | Contains (T item) |
System.Collections.IEnumerator System.Collections.IEnumerable. | GetEnumerator () |
IEnumerator< T > | GetEnumerator () |
T | PopLast (out bool fail) |
T | PopFirst (out bool fail) |
IFRange< T > ICloneable< IFRange< T > >. | Clone () |
IBRange< T > ICloneable< IBRange< T > >. | Clone () |
IRange< T > ICloneable< IRange< T > >. | Clone () |
Repeated< T > | Clone () |
Public Member Functions inherited from Loyc.Collections.IListSource< T > | |
IRange< T > | Slice (int start, int count=int.MaxValue) |
Returns a sub-range of this list. More... | |
Public Member Functions inherited from Loyc.Collections.IContains< T > | |
bool | Contains (T item) |
Returns true if and only if the collection contains the specified item. More... | |
|
inline |
Copies the elements of the collection to an Array, starting at a particular array index.
It's usually more convenient to call the ToArray() extension method, which calls this method for you.
This method exists for performance reasons (the collection itself can often copy data out faster than an enumerator can).
ArgumentNullException | array is null. |
ArgumentOutOfRangeException | arrayIndex is negative. |
ArgumentException | The number of elements in the source collection is greater than the available space from arrayIndex to the end of the destination array. |
Implements Loyc.Collections.ICollectionSource< T >.
|
inline |
Copies the elements of the collection to an Array, starting at a particular array index.
It's usually more convenient to call the ToArray() extension method, which calls this method for you.
This method exists for performance reasons (the collection itself can often copy data out faster than an enumerator can).
ArgumentNullException | array is null. |
ArgumentOutOfRangeException | arrayIndex is negative. |
ArgumentException | The number of elements in the source collection is greater than the available space from arrayIndex to the end of the destination array. |
Implements Loyc.Collections.ICollectionSource< T >.