IVector.As<U> Method
Returns the object as a strongly typed vector of the specified type.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
C#
The object converted to a vector with elements of type U.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
Vector<U> As<U>()
Type Parameters
- U
- The desired element type of the result.
Return Value
Vector<U>The object converted to a vector with elements of type U.
Remarks
If the object is a vector whose element type is also U, the vector is returned without modification. Otherwise, an attempt is made to convert the elements to the specified type.
Exceptions
Invalid | The element type of the object cannot be converted to type U. |