Skip to content

JSMarshaller.GetToJSValueExpression method

Gets a lambda expression that converts from a specified type to a JS value.

C#
public LambdaExpression GetToJSValueExpression(Type fromType)
parameterdescription
fromTypeThe type the value will be converted from.

Exceptions

exceptioncondition
NotSupportedExceptionThe type cannot be converted.

Remarks

Type conversion expressions are built on demand and then cached, so it is efficient to call this method multiple times for the same type.

See Also

Released under the MIT license