Attempts to convert the given object to the given type.

The conversion is performed using optimistic and relaxed conversion rules.

This method will not throw exceptions if conversion fails, but instead return false. Returns true if conversion succeededs, or the input is null.

Location

Namespace
Fuse
Package
Fuse.Marshal 1.9.0

Parameters

t

Type

The type to convert to

o

object

The object to attempt to convert to type t.

res

object

A reference to the variable that will receive the converted value.

diagnosticSource

object

If not null, a diagnostic UserError will be reported if conversion fails, with this object as the source.

Returns

bool