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< in in T > Loyc.Collections.IDeque< T > Loyc.Collections.IQueue< T > Loyc.Collections.IStack< T > Loyc.NullMessageSink Loyc.Collections.AListBase< K, T > Loyc.Collections.DList< T > Loyc.Collections.INegDeque< T > Loyc.Collections.IPriorityQueue< T > Loyc.Collections.MaxHeap< T >

Remarks

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.

Properties

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

Property Documentation

◆ Count

int Loyc.Collections.ICount.Count
get

Gets the number of items in the collection.

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