Enhanced C#
Language of your choice: library documentation
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. This interface is the counterpart to IListSource<T> for lists whose minimum index is not (necessarily) zero. More...


Source file:
Inheritance diagram for Loyc.Collections.INegArray< T >:
Loyc.Collections.INegListSource< T > Loyc.Collections.INegAutoSizeArray< T > Loyc.Collections.INegDeque< T > Loyc.Collections.NegList< T >

Remarks

This interface models the capabilities of an array: getting and setting elements by index, but not adding or removing elements. This interface is the counterpart to IListSource<T> for lists whose minimum index is not (necessarily) zero.

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< 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...
 

Public Member Functions

bool TrySet (int index, T value)
 
- Public Member Functions inherited from Loyc.Collections.INegListSource< T >
IRange< T > Slice (int start, int count=int.MaxValue)
 Returns a sub-range of this list. More...
 

Property Documentation

◆ this[int index]

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.