TYPE

IReadOnlyList<T>

Exposes read-only indexed access and count through a covariant interface. Does not guarantee immutable backing storage.

Formal Syntax & Structure

csharp syntaxcsharp
System.Collections.Generic.IReadOnlyList<out T>

Working Example

Example Snippetcsharp
System.Collections.Generic.IReadOnlyList<object> items = new System.Collections.Generic.List<string> { "pen" };
C# & .NET Reference