JSTypedArray<T>.CastTo<TOther> method
Creates a T struct from this instance. It throws InvalidCastException in case of failure.
C#
public TOther CastTo<TOther>()
where TOther : struct, IJSValue<TOther>| parameter | description |
|---|---|
| TOther | A struct that implements IJSValue interface. |
Return Value
T struct created based on this instance.
Exceptions
| exception | condition |
|---|---|
| InvalidCastException | Thrown when the T struct cannot be crated based on this instance. |
See Also
- interface IJSValue<TSelf>
- struct JSTypedArray<T>
- namespace Microsoft.JavaScript.NodeApi