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