Enhanced C#
Language of your choice: library documentation
Loyc.Collections.IListAndReadOnly< T > Interface Template Reference

This interface is meant to be implemented by read-only sequence classes that originally implemented IList<T> and want to now implement IReadOnlyList<T> and IReadOnlyCollection<T>. It is recommended to implement IListAndListSource<T> instead, but the latter requires you to implement more methods. More...


Source file:
Inheritance diagram for Loyc.Collections.IListAndReadOnly< T >:
Loyc.Collections.ICollectionAndReadOnly< T > Loyc.Collections.IListAndListSource< T > Loyc.Collections.IListImpl< 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 is meant to be implemented by read-only sequence classes that originally implemented IList<T> and want to now implement IReadOnlyList<T> and IReadOnlyCollection<T>. It is recommended to implement IListAndListSource<T> instead, but the latter requires you to implement more methods.

This interface is useful in C# for disambiguation (as explained in the description of IListImpl<T>.) Variables should not have this type (except in disambiguation methods, which immediately cast the variable to another type).