Skip to content

TryConvert Method ​

Definition ​

  • Namespace: JASE
  • Assembly: JASE.ReflectionTools.dll

Overloads ​

NameDescription
bool TryConvert(object input, Type destinationType, out object convertedValue)Attemps to convert the input object to the specified destination type.
bool TryConvert(object input, Type destinationType, out T convertedValue)Attemps to convert the input object to the specified destination type T.

bool TryConvert(object input, Type destinationType, out object convertedValue) ​

csharp
bool TryConvert(object input, Type destinationType, out object convertedValue)

Attemps to convert the input object to the specified destination type.

Parameters ​

NameDescription
convertedValueThe converted value
destinationTypeThe type to convert the object to.
inputThe object to convert.

Returns ​

Boolean True is successful, otherwise false

bool TryConvert(object input, Type destinationType, out T convertedValue) ​

csharp
bool TryConvert(object input, Type destinationType, out T convertedValue)

Attemps to convert the input object to the specified destination type T.

Parameters ​

NameDescription
convertedValueThe converted value of type T
destinationTypeThe type to convert the object to.
inputThe object to convert.

Returns ​

Boolean True is successful, otherwise false