Enhanced C#
Language of your choice: library documentation
List of all members
Loyc.Collections.IListAndListSource< T > Interface Template Reference

This interface combines the original IList<T> interface with its "source" (read-only) component interfaces, including IReadOnlyList<T>, plus IListSource<T>. More...


Source file:
Inheritance diagram for Loyc.Collections.IListAndListSource< T >:
Loyc.Collections.IListSource< T > Loyc.Collections.ICollectionAndReadOnly< T > Loyc.Collections.AListBase< K, T > Loyc.Collections.FVList< T > Loyc.Collections.FWList< T > Loyc.Collections.IListEx< T > Loyc.Collections.Impl.InternalList< T > Loyc.Collections.Impl.ListSourceBase< T > Loyc.Collections.ISparseList< T > Loyc.Collections.ListAsListSource< T > Loyc.Collections.ListSlice< T > Loyc.Collections.ListSourceAsList< T > Loyc.Collections.Repeated< T > Loyc.Collections.VList< T > Loyc.Collections.WList< T > Loyc.Collections.WListBase< T >

Remarks

This interface combines the original IList<T> interface with its "source" (read-only) component interfaces, including IReadOnlyList<T>, plus IListSource<T>.

This interface is not meant to be used by callers. It exists mainly to avoiding ambiguity errors when invoking extension methods in plain C#. For example, there is a TryGet() extension method for IList(T) and an identical TryGet() method for IListSource(T). To prevent the C# from giving an ambiguity error when you try to use TryGet(),

Ironically, however, if you actually try to use the list through this interface you'll tend to get errors. For instance, both IList<T> and IReadOnlyList<T> have an indexer, so using the indexer in this interface is ambiguous.

In Enhanced C# I plan to add some kind of prioritization feature that will eliminate the need for interfaces like this one.

Does not include ISinkList<T> because this interface may be implemented by list classes that are read-only.

Additional Inherited Members

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