TYPE

IReadOnlyCollection<T>

Enumeration and Count without mutation methods through the interface.

Formal Syntax & Structure

csharp syntaxcsharp
IReadOnlyCollection<T>

Working Example

Example Snippetcsharp
using System.Collections.Generic;IReadOnlyCollection<int> items = new[] { 1, 2 };System.Console.WriteLine(items.Count);
C# & .NET Reference