<PackageReference Include="System.Collections.NonGeneric" Version="4.0.1-beta-23409" />

CollectionBase

public abstract class CollectionBase : IList, ICollection, IEnumerable
Provides the abstract base class for a strongly typed collection.
public int Capacity { get; set; }

Gets or sets the number of elements that the CollectionBase can contain.

public int Count { get; }

Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.

protected ArrayList InnerList { get; }

Gets an ArrayList containing the list of elements in the CollectionBase instance.

protected IList List { get; }

Gets an IList containing the list of elements in the CollectionBase instance.

protected CollectionBase()

Initializes a new instance of the CollectionBase class with the default initial capacity.

protected CollectionBase(int capacity)

Initializes a new instance of the CollectionBase class with the specified capacity.

public void Clear()

Removes all objects from the CollectionBase instance. This method cannot be overridden.

Returns an enumerator that iterates through the CollectionBase instance.

protected virtual void OnClear()

Performs additional custom processes when clearing the contents of the CollectionBase instance.

protected virtual void OnClearComplete()

Performs additional custom processes after clearing the contents of the CollectionBase instance.

protected virtual void OnInsert(int index, object value)

Performs additional custom processes before inserting a new element into the CollectionBase instance.

protected virtual void OnInsertComplete(int index, object value)

Performs additional custom processes after inserting a new element into the CollectionBase instance.

protected virtual void OnRemove(int index, object value)

Performs additional custom processes when removing an element from the CollectionBase instance.

protected virtual void OnRemoveComplete(int index, object value)

Performs additional custom processes after removing an element from the CollectionBase instance.

protected virtual void OnSet(int index, object oldValue, object newValue)

Performs additional custom processes before setting a value in the CollectionBase instance.

protected virtual void OnSetComplete(int index, object oldValue, object newValue)

Performs additional custom processes after setting a value in the CollectionBase instance.

protected virtual void OnValidate(object value)

Performs additional custom processes when validating a value.

public void RemoveAt(int index)

Removes the element at the specified index of the CollectionBase instance. This method is not overridable.