Enhanced C#
Loyc library documentation
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Properties | Public Member Functions | List of all members
Loyc.Collections.INegArray< T > Interface Template Reference

This interface models the capabilities of an array: getting and setting elements by index, but not adding or removing elements. Implementing INegListSource{T} makes it slightly different from IArray{T}, in that indexes can be negative, so there are Min and Max properties. More...


Source file:
Inheritance diagram for Loyc.Collections.INegArray< T >:
Loyc.Collections.INegListSource< out T > Loyc.Collections.IArraySink< in T > Loyc.Collections.IIndexed< in K, out V > Loyc.Collections.ITryGet< in K, out V > Loyc.Collections.IIndexed< in K, out V > Loyc.Collections.IAutoNegArray< T > Loyc.Collections.INegAutoSizeArray< T > Loyc.Collections.INegDeque< T > Loyc.Collections.NegList< T > Loyc.Collections.InternalDArray< T >

Remarks

This interface models the capabilities of an array: getting and setting elements by index, but not adding or removing elements. Implementing INegListSource{T} makes it slightly different from IArray{T}, in that indexes can be negative, so there are Min and Max properties.

Properties

new T this[int index] [get, set]
 Gets or sets an element of the array-like collection. More...
 
- Properties inherited from Loyc.Collections.INegListSource< out T >
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 >
this[K key] [get]
 Gets the value associated with the specified key. More...
 
- Properties inherited from Loyc.Collections.IArraySink< in T >
this[int index] [set]
 

Public Member Functions

bool TrySet (int index, T value)
 
- Public Member Functions inherited from Loyc.Collections.INegListSource< out T >
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 >
TryGet (K key, out bool fail)
 Gets the item for the specified key or index, and does not throw an exception on failure. More...
 

Property Documentation

new T Loyc.Collections.INegArray< 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.

A redundant getter is required by C# because C# code is unable to use it (from a reference to INegArray{T}) otherwise.