Skip to content

JSMarshaller.ToJS method (1 of 2)

Converts from a specified type to a JS value.

C#
public JSValue ToJS(Type type, object value)
parameterdescription
typeThe type the value will be converted from.
valueThe value to be converted. Must be an instance (or subtype of) the type.

Exceptions

exceptioncondition
NotSupportedExceptionThe type cannot be converted.

See Also


JSMarshaller.ToJS<T> method (2 of 2)

Converts from a specified type to a JS value.

C#
public JSValue ToJS<T>(T value)
parameterdescription
TThe type the value will be converted from.

Exceptions

exceptioncondition
NotSupportedExceptionThe type cannot be converted.

See Also

Released under the MIT license