共用方式為


Vector128.ToScalar<T>(Vector128<T>) 方法

定義

將指定向量轉換成包含第一個項目值的純量。

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

類型參數

T

輸入向量的型別。

參數

vector
Vector128<T>

要從其中取得第一個項目的向量。

傳回

T

包含第一個項目值的純量 T

例外狀況

不支援 vector (T) 的類型。

適用於