ArrayList Methods

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

The ArrayList type exposes the following members.

  Name Description
Public method Add Adds an object to the end of the ArrayList.
Public method BinarySearch Searches the entire sorted ArrayList for an element using the specified comparer and returns the zero-based index of the element.
Public method Clear Removes all elements from the ArrayList.
Public method Clone Creates a shallow copy of the ArrayList.
Public method Contains Determines whether an element is in the ArrayList.
Public method CopyTo(Array) Copies the entire ArrayList to a compatible one-dimensional Array, starting at the beginning of the target array.
Public method CopyTo(Array, Int32) Copies the entire ArrayList to a compatible one-dimensional Array, starting at the specified index of the target array.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetEnumerator Returns an enumerator for the entire ArrayList.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IndexOf(Object) Searches for the specified Object and returns the zero-based index of the first occurrence within the entire ArrayList.
Public method IndexOf(Object, Int32) Searches for the specified Object and returns the zero-based index of the first occurrence within the range of elements in the ArrayList that extends from the specified index to the last element.
Public method IndexOf(Object, Int32, Int32) Searches for the specified Object and returns the zero-based index of the first occurrence within the range of elements in the ArrayList that starts at the specified index and contains the specified number of elements.
Public method Insert Inserts an element into the ArrayList at the specified index.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Remove Removes the first occurrence of a specific object from the ArrayList.
Public method RemoveAt Removes the element at the specified index of the ArrayList.
Public method ToArray()()()() Copies the elements of the ArrayList to a new Object array.
Public method ToArray(Type) Copies the elements of the ArrayList to a new array of the specified element type.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top
Show: