Export (0) Print
Expand All

ArrayList Methods

The methods of the ArrayList class are listed here. For a complete list of ArrayList class members, see the ArrayList Members topic.

Public Methods

public methodstatic (Shared in Visual Basic)Adapter Creates an ArrayList wrapper for a specific IList.
public methodAdd

Supported by the .NET Compact Framework.

Adds an object to the end of the ArrayList.
public methodAddRange

Supported by the .NET Compact Framework.

Adds the elements of an ICollection to the end of the ArrayList.
public methodBinarySearch

Supported by the .NET Compact Framework.

Overloaded. Uses a binary search algorithm to locate a specific element in the sorted ArrayList or a portion of it.
public methodClear

Supported by the .NET Compact Framework.

Removes all elements from the ArrayList.
public methodClone

Supported by the .NET Compact Framework.

Creates a shallow copy of the ArrayList.
public methodContains

Supported by the .NET Compact Framework.

Determines whether an element is in the ArrayList.
public methodCopyTo

Supported by the .NET Compact Framework.

Overloaded. Copies the ArrayList or a portion of it to a one-dimensional array.
public methodEquals (inherited from Object)

Supported by the .NET Compact Framework.

Overloaded. Determines whether two Object instances are equal.
public methodstatic (Shared in Visual Basic)FixedSize Overloaded. Returns a list wrapper with a fixed size, where elements are allowed to be modified, but not added or removed.
public methodGetEnumerator

Supported by the .NET Compact Framework.

Overloaded. Returns an enumerator that can iterate through the ArrayList.
public methodGetHashCode (inherited from Object)

Supported by the .NET Compact Framework.

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetRange Returns an ArrayList which represents a subset of the elements in the source ArrayList.
public methodGetType (inherited from Object)

Supported by the .NET Compact Framework.

Gets the Type of the current instance.
public methodIndexOf

Supported by the .NET Compact Framework.

Overloaded. Returns the zero-based index of the first occurrence of a value in the ArrayList or in a portion of it.
public methodInsert

Supported by the .NET Compact Framework.

Inserts an element into the ArrayList at the specified index.
public methodInsertRange

Supported by the .NET Compact Framework.

Inserts the elements of a collection into the ArrayList at the specified index.
public methodLastIndexOf Overloaded. Returns the zero-based index of the last occurrence of a value in the ArrayList or in a portion of it.
public methodstatic (Shared in Visual Basic)ReadOnly Overloaded. Returns a list wrapper that is read-only.
public methodRemove

Supported by the .NET Compact Framework.

Removes the first occurrence of a specific object from the ArrayList.
public methodRemoveAt

Supported by the .NET Compact Framework.

Removes the element at the specified index of the ArrayList.
public methodRemoveRange

Supported by the .NET Compact Framework.

Removes a range of elements from the ArrayList.
public methodstatic (Shared in Visual Basic)Repeat Returns an ArrayList whose elements are copies of the specified value.
public methodReverse

Supported by the .NET Compact Framework.

Overloaded. Reverses the order of the elements in the ArrayList or a portion of it.
public methodSetRange Copies the elements of a collection over a range of elements in the ArrayList.
public methodSort

Supported by the .NET Compact Framework.

Overloaded. Sorts the elements in the ArrayList or a portion of it.
public methodstatic (Shared in Visual Basic)Synchronized

Supported by the .NET Compact Framework.

Overloaded. Returns a list wrapper that is synchronized (thread-safe).
public methodToArray

Supported by the .NET Compact Framework.

Overloaded. Copies the elements of the ArrayList to a new array.
public methodToString (inherited from Object)

Supported by the .NET Compact Framework.

Returns a String that represents the current Object.
public methodTrimToSize

Supported by the .NET Compact Framework.

Sets the capacity to the actual number of elements in the ArrayList.

Protected Methods

protected methodFinalize (inherited from Object)

Supported by the .NET Compact Framework.

Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object)

Supported by the .NET Compact Framework.

Creates a shallow copy of the current Object.

See Also

ArrayList Class | System.Collections Namespace

Show:
© 2015 Microsoft