Gets a variable array containing (possibly duplicated) items of a source array
| C# | Visual Basic | Visual C++ |
public static VariableArray<T> GetItems<T>( Variable<T[]> array, VariableArray<int> indices )
Public Shared Function GetItems(Of T) ( _ array As Variable(Of T()), _ indices As VariableArray(Of Integer) _ ) As VariableArray(Of T)
public: generic<typename T> static VariableArray<T>^ GetItems( Variable<array<T>^>^ array, VariableArray<int>^ indices )
- T
- The variable type for the array
- array (Variable<(Of <(array< T >[]()[]>)>))
- The source array
- indices (VariableArray<(Of <(Int32>)>))
- Variable array containing the indices of the elements to get. Indices may be duplicated.
variable array with the specified items
If the indices are known to be all different, use Subarray<(Of <(T>)>)(Variable<(Of <(array<T>[]()[]>)>), VariableArray<(Of <(Int32>)>)) for greater efficiency.