Vector.WithElement<T>(Vector<T>, Int32, T) 메서드

정의

지정된 인덱스의 요소는 지정된 값으로 설정하고 나머지 요소는 지정된 벡터의 요소와 같은 값으로 설정하여 새로운 Vector<T>을 만듭니다.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Vector<T> WithElement(System::Numerics::Vector<T> vector, int index, T value);
public static System.Numerics.Vector<T> WithElement<T> (this System.Numerics.Vector<T> vector, int index, T value);
static member WithElement : System.Numerics.Vector<'T> * int * 'T -> System.Numerics.Vector<'T>
<Extension()>
Public Function WithElement(Of T) (vector As Vector(Of T), index As Integer, value As T) As Vector(Of T)

형식 매개 변수

T

벡터에 있는 요소의 형식입니다.

매개 변수

vector
Vector<T>

나머지 요소를 가져올 벡터입니다.

index
Int32

설정할 요소의 인덱스입니다.

value
T

요소를 설정할 값입니다.

반환

index의 요소 값이 value로 설정되고 나머지 요소는 vector에 있는 요소와 같은 값으로 설정된 Vector<T>입니다.

예외

index가 0 미만이거나 요소 수보다 큽니다.

vector(T)의 형식은 지원되지 않습니다.

적용 대상