JSMarshaller.FromJS method (1 of 2)
Converts from a JS value to a specified type.
C#
public object FromJS(Type type, JSValue value)| parameter | description |
|---|---|
| type | The type the value will be converted to. |
| value | The JavaScript value to be converted. |
Exceptions
| exception | condition |
|---|---|
| NotSupportedException | The type cannot be converted. |
See Also
- struct JSValue
- class JSMarshaller
- namespace Microsoft.JavaScript.NodeApi.DotNetHost
JSMarshaller.FromJS<T> method (2 of 2)
Converts from a JS value to a specified type.
C#
public T FromJS<T>(JSValue value)| parameter | description |
|---|---|
| T | The type the value will be converted to. |
| value | The JavaScript value to be converted. |
Exceptions
| exception | condition |
|---|---|
| NotSupportedException | The type cannot be converted. |
See Also
- struct JSValue
- class JSMarshaller
- namespace Microsoft.JavaScript.NodeApi.DotNetHost