| title | Platform::Array Class | Microsoft Docs | |||
|---|---|---|---|---|
| ms.custom | ||||
| ms.date | 12/30/2016 | |||
| ms.technology | cpp-windows | |||
| ms.reviewer | ||||
| ms.suite | ||||
| ms.tgt_pltfrm | ||||
| ms.topic | language-reference | |||
| f1_keywords |
|
|||
| dev_langs |
|
|||
| helpviewer_keywords |
|
|||
| ms.assetid | 7815ab40-88c5-42b0-83b8-081cef0cda31 | |||
| caps.latest.revision | 9 | |||
| author | ghogen | |||
| ms.author | ghogen | |||
| manager | ghogen |
Represents a one-dimensional, modifiable array that can be received and passed across the application binary interface (ABI).
template <typename T>
private ref class Array<TArg, 1> :
public WriteOnlyArray<TArg, 1>,
public IBoxArray<TArg> Platform::Array inherits all its methods from Platform::WriteOnlyArray Class and implements the Value property of the Platform::IBoxArray Interface.
| Name | Description |
|---|---|
| Array Constructors | Initializes a one-dimensional, modifiable array of types specified by the class template parameter, T. |
See Platform::WriteOnlyArray Class.
| Array::Value | Retrieves a handle to the current array. |
The Array class is sealed and cannot be inherited.
The Windows Runtime type system does not support the concept of jagged arrays and therefore you cannot pass an IVector<Platform::Array<T>> as a return value or method parameter. To pass a jagged array or a sequence of sequences across the ABI, use IVector<IVector<T>^>.
For more information about when and how to use Platform::Array, see Array and WriteOnlyArray.
The Windows Runtime type system does not support the concept of jagged arrays and therefore you cannot pass an IVector<Platform::Array<T>> as a return value or method parameter. To pass a jagged array or a sequence of sequences across the ABI, use IVector<IVector<T>^>.
This class is defined in the vccorlib.h header, which is automatically included by the compiler. It is visible in Intellisense but not in Object Browser because it is not a public type defined in platform.winmd.
Compiler option: /ZW
Initializes a one-dimensional, modifiable array of types specified by the class template parameter, T.
Array(unsigned int size);
Array(T* data, unsigned int size); T
Class template parameter.
size
The number of elements in the array.
data
A pointer to an array of data of type T that is used to initialize this Array object.
For more information about how to create instances of Platform::Array, see Array and WriteOnlyArray.
Retrieves a reference to the array element at the specified index location.
T& get(unsigned int index) const; index
A zero-based index that identifies an element in the array. The minimum index is 0 and the maximum index is the value specified by the size parameter in the Array constructor.
The array element specified by the index parameter.
Retrieves a handle to the current array.
property Array^ Value; A handle to the current array.