共用方式為


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

定義

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

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

類型參數

T

輸入向量的類型。

參數

vector
Vector64<T>

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

index
Int32

要設定之元素的索引。

value
T

要設定元素的值。

傳回

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

例外狀況

不支援 vector (T) 的類型。

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

適用於