Class ReadOnlyCollectionBaseT

ReadOnlyCollectionBase<T> class

Represents a read-only collection of objects.

public abstract class ReadOnlyCollectionBase<T> : IList<T>
ParameterDescription
TType of collection items.

Properties

NameDescription
Count { get; }Gets the number of objects contained in the object.
Item { get; set; }Returns the element at the specified index.

Methods

NameDescription
Add(T)This is the stub implementation of ICollection’s Add method, that only throws NotSupportedException
GetEnumerator()Returns an enumerator for this collection.
ToList()Converts the collection to a list of objects.

See Also