Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Collections.​CollectionBase

Assembly: System.Collections.NonGeneric

Inheritance: object → CollectionBase

Provides the <see langword="abstract" /> base class for a strongly typed collection.

Properties

public int
Capacity
Gets or sets the number of elements that the <see cref="T:System.Collections.CollectionBase" /> can contain.
public int
Count
Gets the number of elements contained in the <see cref="T:System.Collections.CollectionBase" /> instance. This property cannot be overridden.
protected ArrayList
InnerList
Gets an <see cref="T:System.Collections.ArrayList" /> containing the list of elements in the <see cref="T:System.Collections.CollectionBase" /> instance.
protected IList
List
Gets an <see cref="T:System.Collections.IList" /> containing the list of elements in the <see cref="T:System.Collections.CollectionBase" /> instance.

Methods

public void
Clear​()
Removes all objects from the <see cref="T:System.Collections.CollectionBase" /> instance. This method cannot be overridden.
public IEnumerator
GetEnumerator​()
Returns An <see cref="T:System.Collections.IEnumerator" /> for the <see cref="T:System.Collections.CollectionBase" /> instance.
Returns an enumerator that iterates through the <see cref="T:System.Collections.CollectionBase" /> instance.
protected void
OnClear​()
Performs additional custom processes when clearing the contents of the <see cref="T:System.Collections.CollectionBase" /> instance.
protected void
OnClearComplete​()
Performs additional custom processes after clearing the contents of the <see cref="T:System.Collections.CollectionBase" /> instance.
protected void
OnInsert​(int index, object value)
index The zero-based index at which to insert <paramref name="value" /> .
value The new value of the element at <paramref name="index" /> .
Performs additional custom processes before inserting a new element into the <see cref="T:System.Collections.CollectionBase" /> instance.
protected void
OnInsertComplete​(int index, object value)
index The zero-based index at which to insert <paramref name="value" /> .
value The new value of the element at <paramref name="index" /> .
Performs additional custom processes after inserting a new element into the <see cref="T:System.Collections.CollectionBase" /> instance.
protected void
OnRemove​(int index, object value)
index The zero-based index at which <paramref name="value" /> can be found.
value The value of the element to remove from <paramref name="index" /> .
Performs additional custom processes when removing an element from the <see cref="T:System.Collections.CollectionBase" /> instance.
protected void
OnRemoveComplete​(int index, object value)
index The zero-based index at which <paramref name="value" /> can be found.
value The value of the element to remove from <paramref name="index" /> .
Performs additional custom processes after removing an element from the <see cref="T:System.Collections.CollectionBase" /> instance.
protected void
OnSet​(int index, object oldValue, object newValue)
index The zero-based index at which <paramref name="oldValue" /> can be found.
oldValue The value to replace with <paramref name="newValue" /> .
newValue The new value of the element at <paramref name="index" /> .
Performs additional custom processes before setting a value in the <see cref="T:System.Collections.CollectionBase" /> instance.
protected void
OnSetComplete​(int index, object oldValue, object newValue)
index The zero-based index at which <paramref name="oldValue" /> can be found.
oldValue The value to replace with <paramref name="newValue" /> .
newValue The new value of the element at <paramref name="index" /> .
Performs additional custom processes after setting a value in the <see cref="T:System.Collections.CollectionBase" /> instance.
protected void
OnValidate​(object value)
value The object to validate.
Performs additional custom processes when validating a value.
public void
RemoveAt​(int index)
index The zero-based index of the element to remove.
Removes the element at the specified index of the <see cref="T:System.Collections.CollectionBase" /> instance. This method is not overridable.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object