2014-08-13 10:39:27 +01:00
<Type Name= "Array" FullName= "System.Array" >
<TypeSignature Language= "C#" Value= "public class Array" />
<TypeSignature Language= "ILAsm" Value= ".class public auto ansi beforefieldinit Array extends System.Object" />
<AssemblyInfo >
<AssemblyName > DocTest</AssemblyName>
<AssemblyVersion > 0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base >
<BaseTypeName > System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs >
<summary >
2015-04-07 09:35:12 +01:00
<para > Serves as the base class for arrays. Provides methods for creating,
2014-08-13 10:39:27 +01:00
copying, manipulating, searching, and sorting arrays.</para>
2015-04-07 09:35:12 +01:00
</summary>
2014-08-13 10:39:27 +01:00
<remarks >
2015-04-07 09:35:12 +01:00
<para > This class is intended to be used as a base class by
2014-08-13 10:39:27 +01:00
language implementations that support arrays. Only the system can derive from
this type: derived classes of <see cref= "T:System.Array" /> are not to be created by the developer.</para>
2015-04-07 09:35:12 +01:00
<block subset= "none" type= "note" >
<para > An array is a collection of
2014-08-13 10:39:27 +01:00
identically typed data <paramref name= "elements" /> that are accessed and referenced by
sets of integral <paramref name= "indices" /> . </para>
2015-04-07 09:35:12 +01:00
<para > The <paramref name= "rank" /> of an array is the number
2014-08-13 10:39:27 +01:00
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. </para>
2015-04-07 09:35:12 +01:00
<para > The <paramref name= "lower bound" /> of a dimension
2014-08-13 10:39:27 +01:00
is the starting index of that dimension. </para>
2015-04-07 09:35:12 +01:00
<para > The <paramref name= "length" /> of an array is the total number of elements contained in all of its
2014-08-13 10:39:27 +01:00
dimensions. </para>
2015-04-07 09:35:12 +01:00
<para > A <paramref name= "vector" /> is a
2014-08-13 10:39:27 +01:00
one-dimensional array with a <paramref name= "lower bound" /> of '0'. </para>
2015-04-07 09:35:12 +01:00
<para > If the implementer creates a derived class of <see cref= "T:System.Array" /> , expected <see cref= "T:System.Array" /> behavior
2014-08-13 10:39:27 +01:00
cannot be guaranteed. For information on array-like objects with increased
functionality, see the <see cref= "T:System.Collections.IList" /> and <see cref= "T:System.Collections.Generic.IList<T>" /> interfaces. For more information regarding the use of arrays versus the use
of collections, see Partition V of the CLI Specification. </para>
2015-04-07 09:35:12 +01:00
</block>
<para > Every specific <see cref= "T:System.Array" /> type has three instance methods defined on it.
2014-08-13 10:39:27 +01:00
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. </para>
2015-04-07 09:35:12 +01:00
<list type= "bullet" >
<item >
<term >
<para >
<c > Get</c> : Takes as many <see cref= "T:System.Int32" /> arguments as the array
2014-08-13 10:39:27 +01:00
has dimensions and returns the value stored at the given index. It throws a
<see cref= "T:System.IndexOutOfRangeException" />
exception for invalid indices. </para>
2015-04-07 09:35:12 +01:00
</term>
</item>
<item >
<term >
<para >
<c > Set</c> : Takes as many <see cref= "T:System.Int32" /> arguments as the array
2014-08-13 10:39:27 +01:00
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 <see cref= "T:System.IndexOutOfRangeException" />
exception for invalid indices. </para>
2015-04-07 09:35:12 +01:00
</term>
</item>
<item >
<term >
<para >
<c > Address</c> : Takes as many <see cref= "T:System.Int32" /> arguments as the
2014-08-13 10:39:27 +01:00
array has dimensions and returns the address of the element at the given index.
It throws a <see cref= "T:System.IndexOutOfRangeException" />
exception for invalid indices. </para>
2015-04-07 09:35:12 +01:00
</term>
</item>
</list>
<para > In addition, every specific <see cref= "T:System.Array" /> type has a constructor on it that takes as many non-negative
2014-08-13 10:39:27 +01:00
<see cref= "T:System.Int32" />
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 <see cref= "T:System.Int32" /> objects would have a constructor that could be called with
<c > (2, 4)</c> 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. </para>
2015-04-07 09:35:12 +01:00
<para > For all specific array types except vectors (i.e. those
2014-08-13 10:39:27 +01:00
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 <see cref= "T:System.Int32" />
objects would also have a constructor that could be called with <c > (-1, 2, 1, 3)</c> 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. </para>
2015-04-07 09:35:12 +01:00
<para > 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].)</para>
<para > Parallel implementation of methods taking a <see cref= "T:System.Predicate" /> argument are not permitted.</para>
</remarks>
2014-08-13 10:39:27 +01:00
</Docs>
<Members >
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public Array ();" />
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberType > Constructor</MemberType>
<AssemblyInfo >
<AssemblyVersion > 0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs >
<summary > Constructs a new instance of the <see cref= "T:System.Array" /> class.</summary>
<remarks > To be added.</remarks>
</Docs>
</Member>
<Member MemberName= "AsReadOnly<T>" >
<MemberSignature Language= "C#" Value= "public static System.Collections.ObjectModel.ReadOnlyCollection<T> AsReadOnly<T> (T[] array);" />
<MemberSignature Language= "ILAsm" Value= ".method public static hidebysig class System.Collections.ObjectModel.ReadOnlyCollection`1<!!T> AsReadOnly<T>(!!T[] array) cil managed" />
<MemberType > Method</MemberType>
<AssemblyInfo >
<AssemblyVersion > 0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue >
<ReturnType > System.Collections.ObjectModel.ReadOnlyCollection< T> </ReturnType>
</ReturnValue>
<TypeParameters >
<TypeParameter Name= "T" />
</TypeParameters>
<Parameters >
<Parameter Name= "array" Type= "T[]" />
</Parameters>
<Docs >
<typeparam name= "T" > To be added.</typeparam>
<param name= "array" > To be added.</param>
<summary > To be added.</summary>
<returns > To be added.</returns>
<remarks > To be added.</remarks>
<exception cref= "T:System.NotImplementedException" > To be added; from:
<see cref= "M:System.Array.AsReadOnly``1(``0[])" /> </exception>
</Docs>
</Member>
<Member MemberName= "ConvertAll<T,U>" >
<MemberSignature Language= "C#" Value= "public static TOutput[] ConvertAll<TInput,TOutput> (TInput[] array, Converter<TInput,TOutput> converter);" />
<MemberSignature Language= "ILAsm" Value= ".method public static hidebysig !!TOutput[] ConvertAll<TInput, TOutput>(!!TInput[] array, class System.Converter`2<!!TInput, !!TOutput> converter) cil managed" />
<MemberType > Method</MemberType>
<AssemblyInfo >
<AssemblyVersion > 0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue >
<ReturnType > TOutput[]</ReturnType>
</ReturnValue>
<TypeParameters >
<TypeParameter Name= "TInput" />
<TypeParameter Name= "TOutput" />
</TypeParameters>
<Parameters >
<Parameter Name= "array" Type= "TInput[]" />
<Parameter Name= "converter" Type= "System.Converter<TInput,TOutput>" />
</Parameters>
<Docs >
<typeparam name= "TInput" > To be added.</typeparam>
<typeparam name= "TOutput" > To be added.</typeparam>
<param name= "array" > The one-dimensional array to convert.</param>
<param name= "converter" >
2015-04-07 09:35:12 +01:00
<para > A <see cref= "T:System.Converter<T,U>" /> that converts each element from one type to another type.</para>
</param>
2014-08-13 10:39:27 +01:00
<summary >
2015-04-07 09:35:12 +01:00
<para > Converts an array of one type to an array of another type.</para>
</summary>
2014-08-13 10:39:27 +01:00
<returns >
2015-04-07 09:35:12 +01:00
<para > A new array of the target type containing the converted elements from <paramref name= "array" /> .</para>
</returns>
2014-08-13 10:39:27 +01:00
<remarks >
2015-04-07 09:35:12 +01:00
<para > The <see cref= "T:System.Converter<T,U>" /> is a delegate that converts an array element to the target type. The elements of <paramref name= "array" /> are individually passed to this converter, and the converted elements are saved in the new array. The source array remains unchanged.</para>
</remarks>
2014-08-13 10:39:27 +01:00
<exception cref= "T:System.InvalidOperationException" > To be added; from:
<see cref= "M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /> </exception>
<exception cref= "T:System.ArgumentNullException" >
2015-04-07 09:35:12 +01:00
<paramref name= "array" /> is <see langword= "null" /> or <paramref name= "converter" /> is <see langword= "null" /> .</exception>
2014-08-13 10:39:27 +01:00
</Docs>
</Member>
<Member MemberName= "Resize<T>" >
<MemberSignature Language= "C#" Value= "public static void Resize<T> (ref T[] array, int newSize);" />
<MemberSignature Language= "ILAsm" Value= ".method public static hidebysig void Resize<T>(!!T[] array, int32 newSize) cil managed" />
<MemberType > Method</MemberType>
<AssemblyInfo >
<AssemblyVersion > 0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<TypeParameters >
<TypeParameter Name= "T" />
</TypeParameters>
<Parameters >
<Parameter Name= "array" Type= "T[]&" RefType= "ref" />
<Parameter Name= "newSize" Type= "System.Int32" />
</Parameters>
<Docs >
<typeparam name= "T" > To be added.</typeparam>
<param name= "array" > To be added.</param>
<param name= "newSize" > To be added.</param>
<summary > To be added.</summary>
<remarks > To be added.</remarks>
<exception cref= "T:System.Exception" > To be added; from:
<see cref= "M:System.Array.Resize``1(``0[]@,System.Int32)" /> </exception>
</Docs>
</Member>
</Members>
</Type>