Vector128.ToScalar<T>(Vector128<T>) Method

Definition

Converts the given vector to a scalar containing the value of the first element.

C#
public static T ToScalar<T>(this System.Runtime.Intrinsics.Vector128<T> vector);
C#
public static T ToScalar<T>(this System.Runtime.Intrinsics.Vector128<T> vector) where T : struct;

Type Parameters

T

The type of the input vector.

Parameters

vector
Vector128<T>

The vector to get the first element from.

Returns

T

A scalar T containing the value of the first element.

Exceptions

The type of vector (T) is not supported.

Applies to

Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10