Version 3.0.1.0

ConvertUtility class

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.Utilities.Editor
public static class ConvertUtility
Inheritance
  • System.Object
  • ConvertUtility

Methods

CanConvert(Type, Type)
public static bool CanConvert(Type from, Type to)
Parameters
System.Type from

System.Type to

Returns
System.Boolean

CanConvert<TFrom, TTo>()
public static bool CanConvert<TFrom, TTo>()
Returns
System.Boolean

Type Parameters
TFrom

TTo

Convert<T>(Object)
public static T Convert<T>(object value)
Parameters
System.Object value

Returns
T

Type Parameters
T

Convert<TFrom, TTo>(TFrom)
public static TTo Convert<TFrom, TTo>(TFrom value)
Parameters
TFrom value

Returns
TTo

Type Parameters
TFrom

TTo

TryConvert<T>(Object, out T)
public static bool TryConvert<T>(object value, out T result)
Parameters
System.Object value

T result

Returns
System.Boolean

Type Parameters
T

TryConvert<TFrom, TTo>(TFrom, out TTo)
public static bool TryConvert<TFrom, TTo>(TFrom value, out TTo result)
Parameters
TFrom value

TTo result

Returns
System.Boolean

Type Parameters
TFrom

TTo

WeakConvert(Object, Type)
public static object WeakConvert(object value, Type to)
Parameters
System.Object value

System.Type to

Returns
System.Object