Skip to content

JSValue.GetValueExternalOrPrimitive method

Gets the .NET external value or primitive object value (string, boolean, or double) for a JS value, or null if the JS value is not convertible to one of those types.

C#
public object? GetValueExternalOrPrimitive()

Remarks

This is useful when marshalling where a JS value must be converted to some .NET type, but the target type is unknown (object).

See Also

Released under the MIT license