Enhanced C#
Language of your choice: library documentation
Properties | List of all members
Loyc.Collections.ICount Interface Reference

Holds the Count property found in nearly all collection interfaces. More...

Source file:
Inheritance diagram for Loyc.Collections.ICount:
Loyc.Collections.IIsEmpty Loyc.Collections.IAddRange< T > Loyc.Collections.IDeque< T > Loyc.Collections.IQueue< T > Loyc.Collections.IStack< T > Loyc.NullMessageSink Loyc.Collections.BList< T > Loyc.Collections.ICollectionEx< T > Loyc.Collections.IListRangeMethods< T > Loyc.Collections.AListBase< K, T > Loyc.Collections.DList< T > Loyc.Collections.INegDeque< T > Loyc.Collections.BList< T > Loyc.Collections.IListEx< T > Loyc.Collections.ListSlice< T > Loyc.Collections.AList< T > Loyc.Collections.DList< T > Loyc.Collections.IListEx< T > Loyc.Collections.Impl.InternalList< T > Loyc.Collections.ReversedList< T > Loyc.Collections.SparseAList< T >


Holds the Count property found in nearly all collection interfaces.

Microsoft has made this interface unusable by not defining it themselves in .NET 4.5. Now that I've replaced my original interface

interface ISource<out T> : IEnumerable<T>, ICount {}

with Microsoft's IReadOnlyCollection(T), the compiler complains constantly about "Ambiguity between IReadOnlyCollection(T).Count and ICount.Count". Eliminating ICount from most places seems to be the only solution.


int Count [get]
 Gets the number of items in the collection. More...
- Properties inherited from Loyc.Collections.IIsEmpty
bool IsEmpty [get]

Property Documentation

int Loyc.Collections.ICount.Count

Gets the number of items in the collection.

Referenced by Loyc.Collections.LCInterfaces.Any().