System.Array Members

The members of System.Array are listed below.

See Also: Inherited members from System.Object

Public Properties

[read-only]
IsFixedSizebool.

Gets a value indicating whether the Array has a fixed size.

[read-only]
IsReadOnlybool.

Gets a value indicating whether the Array is read-only.

[read-only]
IsSynchronizedbool.

Gets a value indicating whether access to the Array is synchronized (thread safe).

[read-only]
Lengthint.

Gets a 32-bit integer that represents the total number of elements in all the dimensions of the Array.

[read-only]
LongLengthlong.

Gets a 64-bit integer that represents the total number of elements in all the dimensions of the Array.

[read-only]
Rankint.

Gets the rank (number of dimensions) of the Array. For example, a one-dimensional array returns 1, a two-dimensional array returns 2, and so on.

[read-only]
SyncRootobject.

Gets an object that can be used to synchronize access to the Array.

Public Methods

static
AsReadOnly<T>(T[]) : System.Collections.ObjectModel.ReadOnlyCollection<T>
Returns a read-only System.Collections.Generic.IList<T> wrapper around the specified array.
static
BinarySearch(Array, object) : int

Searches an entire one-dimensional sorted array for a specific element, using the IComparable interface implemented by each element of the array and by the specified object.

static
BinarySearch(Array, object, IComparer) : int

Searches an entire one-dimensional sorted array for a value using the specified IComparer interface.

static
BinarySearch(Array, int, int, object) : int

Searches a range of elements in a one-dimensional sorted array for a value, using the IComparable interface implemented by each element of the array and by the specified value.

static
BinarySearch(Array, int, int, object, IComparer) : int

Searches a range of elements in a one-dimensional sorted array for a value, using the specified IComparer interface.

static
BinarySearch<T>(T[], T) : int
Searches an entire one-dimensional sorted array for a specific element, using the IComparable<T> or IComparable interface implemented by each element of the array and by the specified object.
static
BinarySearch<T>(T[], T, IComparer<T>) : int

Searches an entire one-dimensional sorted array for a value using the specified IComparer`1 generic interface.

static
BinarySearch<T>(T[], int, int, T) : int
Searches a range of elements in a one-dimensional sorted array for a value, using the IComparable interface implemented by each element of the array and by the specified value.
static
BinarySearch<T>(T[], int, int, T, IComparer<T>) : int

Searches a range of elements in a one-dimensional sorted array for a value, using the specified IComparer`1 generic interface.

static
Clear(Array, int, int)

Sets a range of elements in an array to the default value of each element type.

Clone() : object

Creates a shallow copy of the Array.

static
ConstrainedCopy(Array, int, Array, int, int)

Copies a range of elements from an Array starting at the specified source index and pastes them to another Array starting at the specified destination index. Guarantees that all changes are undone if the copy does not succeed completely.

static
ConvertAll<TInput,TOutput>(TInput[], Converter<TInput, TOutput>) : TOutput[]

Converts an array of one type to an array of another type.

static
Copy(Array, Array, int)

Copies a range of elements from an Array starting at the first element and pastes them into another Array starting at the first element. The length is specified as a 32-bit integer.

static
Copy(Array, Array, long)

Copies a range of elements from an Array starting at the first element and pastes them into another Array starting at the first element. The length is specified as a 64-bit integer.

static
Copy(Array, int, Array, int, int)

Copies a range of elements from an Array starting at the specified source index and pastes them to another Array starting at the specified destination index. The length and the indexes are specified as 32-bit integers.

static
Copy(Array, long, Array, long, long)

Copies a range of elements from an Array starting at the specified source index and pastes them to another Array starting at the specified destination index. The length and the indexes are specified as 64-bit integers.

CopyTo(Array, int)

Copies all the elements of the current one-dimensional array to the specified one-dimensional array starting at the specified destination array index. The index is specified as a 32-bit integer.

CopyTo(Array, long)

Copies all the elements of the current one-dimensional array to the specified one-dimensional array starting at the specified destination array index. The index is specified as a 64-bit integer.

static
CreateInstance(Type, int) : Array

Creates a one-dimensional Array of the specified Type and length, with zero-based indexing.

static
CreateInstance(Type, params int[]) : Array

Creates a multidimensional Array of the specified Type and dimension lengths, with zero-based indexing. The dimension lengths are specified in an array of 32-bit integers.

static
CreateInstance(Type, params long[]) : Array

Creates a multidimensional Array of the specified Type and dimension lengths, with zero-based indexing. The dimension lengths are specified in an array of 64-bit integers.

static
CreateInstance(Type, int, int) : Array

Creates a two-dimensional Array of the specified Type and dimension lengths, with zero-based indexing.

static
CreateInstance(Type, int[], int[]) : Array

Creates a multidimensional Array of the specified Type and dimension lengths, with the specified lower bounds.

static
CreateInstance(Type, int, int, int) : Array

Creates a three-dimensional Array of the specified Type and dimension lengths, with zero-based indexing.

static
Exists<T>(T[], Predicate<T>) : bool

Determines whether the specified array contains elements that match the conditions defined by the specified predicate.

static
Find<T>(T[], Predicate<T>) : T

Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire Array.

static
FindAll<T>(T[], Predicate<T>) : T[]

Retrieves all the elements that match the conditions defined by the specified predicate.

static
FindIndex<T>(T[], Predicate<T>) : int

Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the entire Array.

static
FindIndex<T>(T[], int, Predicate<T>) : int

Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the Array that extends from the specified index to the last element.

static
FindIndex<T>(T[], int, int, Predicate<T>) : int

Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the Array that starts at the specified index and contains the specified number of elements.

static
FindLast<T>(T[], Predicate<T>) : T

Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire Array.

static
FindLastIndex<T>(T[], Predicate<T>) : int

Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire Array.

static
FindLastIndex<T>(T[], int, Predicate<T>) : int

Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the Array that extends from the first element to the specified index.

static
FindLastIndex<T>(T[], int, int, Predicate<T>) : int

Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the Array that contains the specified number of elements and ends at the specified index.

static
ForEach<T>(T[], Action<T>)

Performs the specified action on each element of the specified array.

GetEnumerator() : IEnumerator

Returns an IEnumerator for the Array.

GetLength(int) : int

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

GetLongLength(int) : long

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

GetLowerBound(int) : int

Gets the index of the first element of the specified dimension in the array.

GetUpperBound(int) : int

Gets the index of the last element of the specified dimension in the array.

GetValue(int) : object

Gets the value at the specified position in the one-dimensional Array. The index is specified as a 32-bit integer.

GetValue(params int[]) : object

Gets the value at the specified position in the multidimensional Array. The indexes are specified as an array of 32-bit integers.

GetValue(long) : object

Gets the value at the specified position in the one-dimensional Array. The index is specified as a 64-bit integer.

GetValue(params long[]) : object

Gets the value at the specified position in the multidimensional Array. The indexes are specified as an array of 64-bit integers.

GetValue(int, int) : object

Gets the value at the specified position in the two-dimensional Array. The indexes are specified as 32-bit integers.

GetValue(long, long) : object

Gets the value at the specified position in the two-dimensional Array. The indexes are specified as 64-bit integers.

GetValue(int, int, int) : object

Gets the value at the specified position in the three-dimensional Array. The indexes are specified as 32-bit integers.

GetValue(long, long, long) : object

Gets the value at the specified position in the three-dimensional Array. The indexes are specified as 64-bit integers.

static
IndexOf(Array, object) : int

Searches for the specified object and returns the index of the first occurrence within the entire one-dimensional Array.

static
IndexOf(Array, object, int) : int

Searches for the specified object and returns the index of the first occurrence within the range of elements in the one-dimensional Array that extends from the specified index to the last element.

static
IndexOf(Array, object, int, int) : int

Searches for the specified object and returns the index of the first occurrence within the range of elements in the one-dimensional Array that starts at the specified index and contains the specified number of elements.

static
IndexOf<T>(T[], T) : int
Searches the specified array, returning the index of the first occurrence of the specified value.
static
IndexOf<T>(T[], T, int) : int
Searches the specified array, returning the index of the first occurrence in the specified array starting at the specified index and including the last element.
static
IndexOf<T>(T[], T, int, int) : int
Searches for the specified value and returns the index of the first occurrence within the range of elements in the array starting at the specified index and continuing for, at most, the specified number of elements.
Initialize()

Initializes every element of the value-type Array by calling the default constructor of the value type.

static
LastIndexOf(Array, object) : int

Searches for the specified object and returns the index of the last occurrence within the entire one-dimensional Array.

static
LastIndexOf(Array, object, int) : int

Searches for the specified object and returns the index of the last occurrence within the range of elements in the one-dimensional Array that extends from the first element to the specified index.

static
LastIndexOf(Array, object, int, int) : int

Searches for the specified object and returns the index of the last occurrence within the range of elements in the one-dimensional Array that contains the specified number of elements and ends at the specified index.

static
LastIndexOf<T>(T[], T) : int
Searches the specified array, returning the index of the last occurrence of the specified value.
static
LastIndexOf<T>(T[], T, int) : int
Searches the specified array backwards, returning the index of the last occurrence of the specified array, starting at the specified index.
static
LastIndexOf<T>(T[], T, int, int) : int
Searches for the specified value and returns the index of the last occurrence within the range of elements in the array starting at the specified index and continuing backwards for, at most, the specified number of elements.
static
Resize<T>(ref T[], int)
Documentation for this section has not yet been entered.
static
Reverse(Array)

Reverses the sequence of the elements in the entire one-dimensional Array.

static
Reverse(Array, int, int)

Reverses the sequence of the elements in a range of elements in the one-dimensional Array.

SetValue(object, int)

Sets a value to the element at the specified position in the one-dimensional Array. The index is specified as a 32-bit integer.

SetValue(object, params int[])

Sets a value to the element at the specified position in the multidimensional Array. The indexes are specified as an array of 32-bit integers.

SetValue(object, long)

Sets a value to the element at the specified position in the one-dimensional Array. The index is specified as a 64-bit integer.

SetValue(object, params long[])

Sets a value to the element at the specified position in the multidimensional Array. The indexes are specified as an array of 64-bit integers.

SetValue(object, int, int)

Sets a value to the element at the specified position in the two-dimensional Array. The indexes are specified as 32-bit integers.

SetValue(object, long, long)

Sets a value to the element at the specified position in the two-dimensional Array. The indexes are specified as 64-bit integers.

SetValue(object, int, int, int)

Sets a value to the element at the specified position in the three-dimensional Array. The indexes are specified as 32-bit integers.

SetValue(object, long, long, long)

Sets a value to the element at the specified position in the three-dimensional Array. The indexes are specified as 64-bit integers.

static
Sort(Array)

Sorts the elements in an entire one-dimensional Array using the IComparable implementation of each element of the Array.

static
Sort(Array, Array)

Sorts a pair of one-dimensional Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the IComparable implementation of each key.

static
Sort(Array, IComparer)

Sorts the elements in a one-dimensional Array using the specified IComparer.

static
Sort(Array, Array, IComparer)

Sorts a pair of one-dimensional Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the specified IComparer.

static
Sort(Array, int, int)

Sorts the elements in a range of elements in a one-dimensional Array using the IComparable implementation of each element of the Array.

static
Sort(Array, Array, int, int)

Sorts a range of elements in a pair of one-dimensional Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the IComparable implementation of each key.

static
Sort(Array, int, int, IComparer)

Sorts the elements in a range of elements in a one-dimensional Array using the specified IComparer.

static
Sort(Array, Array, int, int, IComparer)

Sorts a range of elements in a pair of one-dimensional Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the specified IComparer.

static
Sort<T>(T[])
Sorts the elements in an entire array using the IComparable<T> or IComparable implementation of each element of that array.
static
Sort<T>(T[], IComparer<T>)

Sorts the elements in an Array using the specified IComparer`1 generic interface.

static
Sort<T>(T[], Comparison<T>)

Sorts the elements in an Array using the specified Comparison`1.

static
Sort<T>(T[], int, int)
Sorts an array using the IComparable<T> or IComparable implementation of each element of that array.
static
Sort<T>(T[], int, int, IComparer<T>)

Sorts the elements in a range of elements in an Array using the specified IComparer`1 generic interface.

static
Sort<TKey,TValue>(TKey[], TValue[])
Sorts a pair of arrays based on the keys in the first array using the IComparable implementation of each key.
static
Sort<TKey,TValue>(TKey[], TValue[], IComparer<TKey>)

Sorts a pair of Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the specified IComparer`1 generic interface.

static
Sort<TKey,TValue>(TKey[], TValue[], int, int)
Sorts a range of elements in a pair of arrays based on the keys in the first array, using the IComparable<K> or IComparable implementation of each key.
static
Sort<TKey,TValue>(TKey[], TValue[], int, int, IComparer<TKey>)

Sorts a range of elements in a pair of Array objects (one contains the keys and the other contains the corresponding items) based on the keys in the first Array using the specified IComparer`1 generic interface.

static
TrueForAll<T>(T[], Predicate<T>) : bool

Determines whether every element in the array matches the conditions defined by the specified predicate.

Explicitly Implemented Interface Members

IList.Add

Adds an item to IList.

IList.Clear

Removes all items from the IList.

IStructuralComparable.CompareTo

Determines whether the current collection object precedes, occurs in the same position as, or follows another object in the sort order.

IList.Contains

Determines whether an element is in the IList.

[read-only]
ICollection.Countint.

Gets the number of elements contained in the Array.

IStructuralEquatable.Equals

Determines whether an object is equal to the current instance.

IStructuralEquatable.GetHashCode

Returns a hash code for the current instance.

IList.IndexOf

Determines the index of a specific item in the IList.

IList.Insert

Inserts an item to the IList at the specified index.

IList.Itemobject. Implemented to support the IList interface. [Note: For more information, see IList.Item.]
IList.Remove

Removes the first occurrence of a specific object from the IList.

IList.RemoveAt

Removes the IList item at the specified index.