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 小于零或者大于元素个数。

适用于