description | title | ms.date | ms.topic | f1_keywords | helpviewer_keywords | ms.assetid | |||
---|---|---|---|---|---|---|---|---|---|
Learn more about: Platform::Array Class |
Platform::Array Class |
12/30/2016 |
reference |
|
|
7815ab40-88c5-42b0-83b8-081cef0cda31 |
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.
Name | Description |
---|---|
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.
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.