Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Array Methods

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

Public Methods

public methodstatic (Shared in Visual Basic)BinarySearch

Supported by the .NET Compact Framework.

Overloaded. Searches a one-dimensional sorted Array for a value, using a binary search algorithm.
public methodstatic (Shared in Visual Basic)Clear

Supported by the .NET Compact Framework.

Sets a range of elements in the Array to zero, to false, or to a null reference (Nothing in Visual Basic), depending on the element type.
public methodClone

Supported by the .NET Compact Framework.

Creates a shallow copy of the Array.
public methodstatic (Shared in Visual Basic)Copy

Supported by the .NET Compact Framework.

Overloaded. Copies a section of one Array to another Array and performs type casting and boxing as required.
public methodCopyTo

Supported by the .NET Compact Framework.

Overloaded. Copies all the elements of the current one-dimensional Array to the specified one-dimensional Array.
public methodstatic (Shared in Visual Basic)CreateInstance

Supported by the .NET Compact Framework.

Overloaded. Initializes a new instance of the Array class.
public methodEquals (inherited from Object)

Supported by the .NET Compact Framework.

Overloaded. Determines whether two Object instances are equal.
public methodGetEnumerator

Supported by the .NET Compact Framework.

Returns an IEnumerator for the Array.
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 methodGetLength

Supported by the .NET Compact Framework.

Gets a 32-bit integer that represents the number of elements in the specified dimension of the Array.
public methodGetLongLength Gets a 64-bit integer that represents the number of elements in the specified dimension of the Array.
public methodGetLowerBound

Supported by the .NET Compact Framework.

Gets the lower bound of the specified dimension in the Array.
public methodGetType (inherited from Object)

Supported by the .NET Compact Framework.

Gets the Type of the current instance.
public methodGetUpperBound

Supported by the .NET Compact Framework.

Gets the upper bound of the specified dimension in the Array.
public methodGetValue

Supported by the .NET Compact Framework.

Overloaded. Gets the value of the specified element in the current Array. The indexes are specified as an array of 32-bit integers.
public methodstatic (Shared in Visual Basic)IndexOf

Supported by the .NET Compact Framework.

Overloaded. Returns the index of the first occurrence of a value in a one-dimensional Array or in a portion of the Array.
public methodInitialize

Supported by the .NET Compact Framework.

Initializes every element of the value-type Array by calling the default constructor of the value type.
public methodstatic (Shared in Visual Basic)LastIndexOf

Supported by the .NET Compact Framework.

Overloaded. Returns the index of the last occurrence of a value in a one-dimensional Array or in a portion of the Array.
public methodstatic (Shared in Visual Basic)Reverse

Supported by the .NET Compact Framework.

Overloaded. Reverses the order of the elements in a one-dimensional Array or in a portion of the Array.
public methodSetValue

Supported by the .NET Compact Framework.

Overloaded. Sets the specified element in the current Array to the specified value.
public methodstatic (Shared in Visual Basic)Sort

Supported by the .NET Compact Framework.

Overloaded. Sorts the elements in one-dimensional Array objects.
public methodToString (inherited from Object)

Supported by the .NET Compact Framework.

Returns a String that represents the current Object.

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.

Explicit Interface Implementations

IList.Add Implements IList.Add. Always throws NotSupportedException.
IList.Clear Sets all elements in the Array to zero, to false, or to a null reference (Nothing in Visual Basic), depending on the element type.
IList.Contains Determines whether an element is in the Array.
IList.IndexOf Searches for the specified object and returns the index of the first occurrence within the current one-dimensional instance.
IList.Insert Implements IList.Insert. Always throws NotSupportedException.
IList.Remove Implements IList.Remove. Always throws NotSupportedException.
IList.RemoveAt Implements IList.RemoveAt. Always throws NotSupportedException.

See Also

Array Class | System Namespace

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft