Enhanced C#
Language of your choice: library documentation
Properties | Public Member Functions | List of all members
Loyc.Collections.IArray< T > Interface Template Reference

This interface models the capabilities of an array: getting and setting elements by index, but not adding or removing elements. More...


Source file:
Inheritance diagram for Loyc.Collections.IArray< T >:
Loyc.Collections.IListSource< T > Loyc.Collections.ISinkArray< T > Loyc.Collections.IAutoSizeArray< T > Loyc.Collections.IListEx< T > Loyc.Collections.ListSlice< T > Loyc.Collections.AList< T > Loyc.Collections.DList< T > Loyc.Collections.Impl.ListExBase< T > Loyc.Collections.ISparseListEx< T > Loyc.Collections.ReversedList< T > Loyc.Collections.SparseAList< T > Loyc.Collections.IndexedAList< T > Loyc.Collections.SparseAList< T >

Remarks

This interface models the capabilities of an array: getting and setting elements by index, but not adding or removing elements.

Member list:

public T this[int index] { get; set; }
public T TryGet(int index, ref bool fail);
public Iterator<T> GetIterator();
public int Count { get; }
public IEnumerator<T> GetEnumerator();
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator();

Properties

new T this[int index] [get, set]
 Gets or sets an element of the array-like collection. More...
 
- Properties inherited from Loyc.Collections.ISinkArray< T >
this[int index] [set]
 

Public Member Functions

bool TrySet (int index, T value)
 
- Public Member Functions inherited from Loyc.Collections.IListSource< T >
TryGet (int index, out bool fail)
 Gets the item at the specified index, and does not throw an exception on failure. More...
 
IRange< T > Slice (int start, int count=int.MaxValue)
 Returns a sub-range of this list. More...
 

Property Documentation

new T Loyc.Collections.IArray< T >.this[int index]
getset

Gets or sets an element of the array-like collection.

Returns
The value of the array at the specified index.

This redundant indexer is required by C# because the compiler imagines that the setter in ISinkArray<T> conflicts with the getter in IListSource<T>.