Represents a sequential collection of objects that can be individually accessed by index. The type of each object in the collection is specified by the specified template parameter. Allowed types are:
template <typename T, typename E> ref class Vector sealed;
Allowed types are:
-
integers
-
interface class ^
-
public ref class^
-
value struct
-
public enum class
The Vector class is the C++ concrete implementation of the Windows::Foundation::Collections::IVector interface.
If you attempt to use a Vector type in a public return value or parameter, compiler error C3986 will be raised. You can fix the error by changing the parameter or return value type to Windows::Foundation::Collections::IVector. For more information, see Collections (C++/CX).
Public Constructors
|
Name |
Description |
|---|---|
|
Initializes a new instance of the Vector class. |
Public Methods
|
Name |
Description |
|---|---|
|
Inserts the specified item after the last item in the current Vector. |
|
|
Deletes all the elements in the current Vector. |
|
|
Returns an iterator that specifies the first element in the Vector. |
|
|
Retrieves the element of the current Vector that is identifed by the specified index. |
|
|
Retrieves a sequence of items from the current Vector, starting at the specified index. |
|
|
Returns a read-only view of a Vector; that is, a Platform::Collections::VectorView. |
|
|
Searches for the specified item in the current Vector, and if found, returns the index of the item. |
|
|
Inserts the specified item into the current Vector after the element identified by the specified index. |
|
|
Deletes the elements in the current Vector and then inserts the elements from the specified array. |
|
|
Deletes the element identified by the specified index from the current Vector. |
|
|
Deletes the element at the end of the current Vector. |
|
|
Assigns the specified value to the element in the current Vector that is identified by the specified index. |
|
|
Returns the number of elements in the current Vector object. |
Events
|
Name |
Description |
|
event Windows::Foundation::Collection::VectorChangedEventHandler<T>^ VectorChanged |
Occurs when the Vector changes. |