Class ReadOnlyCollectionBase

Class ReadOnlyCollectionBase

Namespace: Aspose.Tasks
Assembly: Aspose.Tasks.dll (25.12.0)

Represents a read-only collection of objects.

public abstract class ReadOnlyCollectionBase<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable

Type Parameters

T

Type of collection items.

Inheritance

object ReadOnlyCollectionBase<T>

Implements

IList<T> , ICollection<T> , IEnumerable<T> , IEnumerable

Inherited Members

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Properties

Count

Gets the number of objects contained in the object.

public int Count { get; }

Property Value

int

this[int]

Returns the element at the specified index.

public T this[int index] { get; set; }

Property Value

T

Methods

Add(T)

This is the stub implementation of ICollection’s Add method, that only throws NotSupportedException

public void Add(T item)

Parameters

item T

The item to add.

GetEnumerator()

Returns an enumerator for this collection.

public IEnumerator<T> GetEnumerator()

Returns

IEnumerator <T>

An enumerator for this collection.

ToList()

Converts the collection to a list of objects.

public List<T> ToList()

Returns

List <T>

Generic list of objects.

 English