DocTest
0.0.0.0
System.Object
Serves as the base class for arrays. Provides methods for creating,
copying, manipulating, searching, and sorting arrays.
This class is intended to be used as a base class by
language implementations that support arrays. Only the system can derive from
this type: derived classes of are not to be created by the developer.
An array is a collection of
identically typed data that are accessed and referenced by
sets of integral .
The of an array is the number
of dimensions in the array. Each dimension has its own set of indices. An array
with a rank greater than one can have a different lower
bound and a different number of elements for each dimension. Multidimensional
arrays (i.e. arrays with a rank greater than one) are processed in row-major
order.
The of a dimension
is the starting index of that dimension.
The of an array is the total number of elements contained in all of its
dimensions.
A is a
one-dimensional array with a of '0'.
If the implementer creates a derived class of , expected behavior
cannot be guaranteed. For information on array-like objects with increased
functionality, see the and interfaces. For more information regarding the use of arrays versus the use
of collections, see Partition V of the CLI Specification.
Every specific type has three instance methods defined on it.
While some programming languages allow direct access to these methods, they are
primarily intended to be called by the output of compilers based on language
syntax that deals with arrays.
-
Get: Takes as many arguments as the array
has dimensions and returns the value stored at the given index. It throws a
exception for invalid indices.
-
Set: Takes as many arguments as the array
has dimensions, plus one additional argument (the last argument) which has the
same type as an array element. It stores the final value in the specified
index of the array. It throws a
exception for invalid indices.
-
Address: Takes as many arguments as the
array has dimensions and returns the address of the element at the given index.
It throws a
exception for invalid indices.
In addition, every specific type has a constructor on it that takes as many non-negative
arguments as the array has dimensions. The arguments specify the
number of elements in each dimension, and a lower bound of 0. Thus, a
two-dimensional array of objects would have a constructor that could be called with
(2, 4) as its arguments to create an array of eight zeros with the first dimension indexed
with 0 and 1 and the second dimension indexed with 0, 1, 2, and 3.
For all specific array types except vectors (i.e. those
permitted to have non-zero lower bounds and those with more than one dimension)
there is an additional constructor. It takes twice as many arguments as the
array has dimensions. The arguments are considered in pairs, with the first of
the pair specifying the lower bound for that dimension and the second specifying
the total number of elements in that dimension. Thus, a two-dimensional array
of
objects would also have a constructor that could be called with (-1, 2, 1, 3) as its arguments,
specifying an array of 6 zeros, with the first dimension indexed by -1 and 0,
and the second dimension indexed by 1, 2, and 3.
Enumeration over an array occurs in ascending row-major order, starting from the first element. (For example, a 2x3 array is traversed in the order [0,0], [0,1], [0,2], [1,0], [1,1], and [1,2].)
Parallel implementation of methods taking a argument are not permitted.
Constructor
0.0.0.0
Constructs a new instance of the class.
To be added.
Method
0.0.0.0
System.Collections.ObjectModel.ReadOnlyCollection<T>
To be added.
To be added.
To be added.
To be added.
To be added.
To be added; from:
Method
0.0.0.0
TOutput[]
To be added.
To be added.
The one-dimensional array to convert.
A that converts each element from one type to another type.
Converts an array of one type to an array of another type.
A new array of the target type containing the converted elements from .
The is a delegate that converts an array element to the target type. The elements of are individually passed to this converter, and the converted elements are saved in the new array. The source array remains unchanged.
To be added; from:
is or is .
Method
0.0.0.0
System.Void
To be added.
To be added.
To be added.
To be added.
To be added.
To be added; from: