Click or drag to resize
ArrayList Methods

The ArrayList type exposes the following members.

Methods
  NameDescription
Public methodAdd
Adds an object to the end of the ArrayList.
Public methodAddRange
Adds the elements of an ICollection to the end of the ArrayList.
Public methodBinarySearch(Object)
Searches the entire sorted ArrayList for an element using the default comparer and returns the zero-based index of the element.
Public methodBinarySearch(Object, IComparer)
Searches the entire sorted ArrayList for an element using the specified comparer and returns the zero-based index of the element.
Public methodBinarySearch(Int32, Int32, Object, IComparer)
Searches a range of elements in the sorted ArrayList for an element using the specified comparer and returns the zero-based index of the element.
Public methodClear
Removes all elements from the ArrayList.
Public methodContains
Determines whether an element is in the ArrayList.
Public methodCopyTo(Array)
Copies the entire ArrayList to a compatible one-dimensional Array, starting at the beginning of the target array.
Public methodCopyTo(Array, Int32)
Copies the entire ArrayList to a compatible one-dimensional Array, starting at the specified index of the target array.
Public methodCopyTo(Int32, Array, Int32, Int32)
Copies a range of elements from the ArrayList to a compatible one-dimensional Array, starting at the specified index of the target array.
Public methodEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator for the entire ArrayList.
Public methodGetEnumerator(Int32, Int32)
Returns an enumerator for a range of elements in the ArrayList.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIndexOf(Object)
Searches for the specified Object and returns the zero-based index of the first occurrence within the entire ArrayList.
Public methodIndexOf(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 methodIndexOf(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 methodInsert
Inserts an element into the ArrayList at the specified index.
Public methodInsertRange
Inserts the elements of a collection into the ArrayList at the specified index.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove
Removes the first occurrence of a specific object from the ArrayList.
Public methodRemoveAt
Removes the element at the specified index of the ArrayList.
Public methodRemoveRange
Removes a range of elements from the ArrayList.
Public methodReverse
Reverses the order of the elements in the entire ArrayList.
Public methodReverse(Int32, Int32)
Reverses the order of the elements in the specified range.
Public methodSort
Sorts the elements in the entire ArrayList.
Public methodSort(IComparer)
Sorts the elements in the entire ArrayList using the specified comparer.
Public methodSort(Int32, Int32, IComparer)
Sorts the elements in a range of elements in ArrayList using the specified comparer.
Public methodToArray
Copies the elements of the ArrayList to a new Object array.
Public methodToArray(Type)
Copies the elements of the ArrayList to a new array of the specified element type.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also