Vector128.GetElement<T>(Vector128<T>, Int32) Method

Definition

获取指定索引处的元素。Gets the element at the specified index.

public:
generic <typename T>
 where T : value class[System::Runtime::CompilerServices::Extension]
 static T GetElement(System::Runtime::Intrinsics::Vector128<T> vector, int index);
public static T GetElement<T> (this System.Runtime.Intrinsics.Vector128<T> vector, int index) where T : struct;
static member GetElement : System.Runtime.Intrinsics.Vector128<'T (requires 'T : struct)> * int -> 'T (requires 'T : struct)
<Extension()>
Public Function GetElement(Of T As Structure) (vector As Vector128(Of T), index As Integer) As T

Type Parameters

T

输入向量的类型。The type of the input vector.

Parameters

vector
Vector128<T>

要从中获取元素的向量。The vector to get the element from.

index
Int32

要获取的元素的索引。The index of the element to get.

Returns

T

index 处的元素的值。The value of the element at index.

Exceptions

不支持 vector 类型 (T)。The type of vector (T) is not supported.

index 小于零或者大于元素个数。index was less than zero or greater than the number of elements.

Applies to