Language of your choice: library documentation
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.
|Public Member Functions inherited from Loyc.Collections.IListSource< T >|
|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...|