Vector128.WithElement<T>(Vector128<T>, Int32, T) 方法

定義

建立新的 Vector128<T>,其中指定索引處的項目設為指定值,且其餘項目設定為與指定向量中值的相同值。

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

類型參數

T

輸入向量的型別。

參數

vector
Vector128<T>

要從其中取得剩餘項目的向量。

index
Int32

要設定之元素的索引。

value
T

要設定元素的值。

傳回

Vector128<T>,其中 index 處的項目值設為 value,且其餘項目則設定為與 vector 中值的相同值。

例外狀況

不支援 vector (T) 的類型。

index 小於零或大於項目的數目。

適用於