Gets a variable array containing different items of a source array
| C# | Visual Basic | Visual C++ |
public static VariableArray<T> Subarray<T>( Variable<T[]> array, VariableArray<int> indices )
Public Shared Function Subarray(Of T) ( _ array As Variable(Of T()), _ indices As VariableArray(Of Integer) _ ) As VariableArray(Of T)
public: generic<typename T> static VariableArray<T>^ Subarray( Variable<array<T>^>^ array, VariableArray<int>^ indices )
- T
- The domain type of array elements.
- array (Variable<(Of <(array< T >[]()[]>)>))
- The source array
- indices (VariableArray<(Of <(Int32>)>))
- Variable array containing the indices of the elements to get. The indices must all be different.
variable array with the specified items
To allow duplicate indices, use GetItems<(Of <(T>)>)(Variable<(Of <(array<T>[]()[]>)>), VariableArray<(Of <(Int32>)>)).