Class ConversionUtility
Inheritance
object
ConversionUtility
Assembly: solution.dll
Syntax
public static class ConversionUtility
Methods
CanConvert(object, Type, bool)
Declaration
public static bool CanConvert(object value, Type type, bool guaranteed)
Parameters
| Type |
Name |
Description |
| object |
value |
|
| Type |
type |
|
| bool |
guaranteed |
|
Returns
CanConvert(Type, Type, bool)
Declaration
public static bool CanConvert(Type source, Type destination, bool guaranteed)
Parameters
| Type |
Name |
Description |
| Type |
source |
|
| Type |
destination |
|
| bool |
guaranteed |
|
Returns
Convert(object, Type)
Declaration
public static object Convert(object value, Type type)
Parameters
| Type |
Name |
Description |
| object |
value |
|
| Type |
type |
|
Returns
ConvertTo(object, Type)
Declaration
public static object ConvertTo(this object source, Type type)
Parameters
| Type |
Name |
Description |
| object |
source |
|
| Type |
type |
|
Returns
ConvertTo<T>(object)
Declaration
public static T ConvertTo<T>(this object source)
Parameters
| Type |
Name |
Description |
| object |
source |
|
Returns
Type Parameters
Convert<T>(object)
Declaration
public static T Convert<T>(object value)
Parameters
| Type |
Name |
Description |
| object |
value |
|
Returns
Type Parameters
GetRequiredConversion(object, Type)
Declaration
public static ConversionUtility.ConversionType GetRequiredConversion(object value, Type type)
Parameters
| Type |
Name |
Description |
| object |
value |
|
| Type |
type |
|
Returns
GetRequiredConversion(Type, Type)
Declaration
public static ConversionUtility.ConversionType GetRequiredConversion(Type source, Type destination)
Parameters
| Type |
Name |
Description |
| Type |
source |
|
| Type |
destination |
|
Returns
HasExplicitNumericConversion(Type, Type)
Declaration
public static bool HasExplicitNumericConversion(Type source, Type destination)
Parameters
| Type |
Name |
Description |
| Type |
source |
|
| Type |
destination |
|
Returns
HasImplicitNumericConversion(Type, Type)
Declaration
public static bool HasImplicitNumericConversion(Type source, Type destination)
Parameters
| Type |
Name |
Description |
| Type |
source |
|
| Type |
destination |
|
Returns
HasNumericConversion(Type, Type)
Declaration
public static bool HasNumericConversion(Type source, Type destination)
Parameters
| Type |
Name |
Description |
| Type |
source |
|
| Type |
destination |
|
Returns
IsConvertibleTo(object, Type, bool)
Declaration
public static bool IsConvertibleTo(this object source, Type type, bool guaranteed)
Parameters
| Type |
Name |
Description |
| object |
source |
|
| Type |
type |
|
| bool |
guaranteed |
|
Returns
IsConvertibleTo(Type, Type, bool)
Declaration
public static bool IsConvertibleTo(this Type source, Type destination, bool guaranteed)
Parameters
| Type |
Name |
Description |
| Type |
source |
|
| Type |
destination |
|
| bool |
guaranteed |
|
Returns
IsConvertibleTo<T>(object, bool)
Declaration
public static bool IsConvertibleTo<T>(this object source, bool guaranteed)
Parameters
| Type |
Name |
Description |
| object |
source |
|
| bool |
guaranteed |
|
Returns
Type Parameters
TryConvert(object, Type, out object, bool)
Declaration
public static bool TryConvert(object value, Type type, out object result, bool guaranteed)
Parameters
| Type |
Name |
Description |
| object |
value |
|
| Type |
type |
|
| object |
result |
|
| bool |
guaranteed |
|
Returns
TryConvert<T>(object, out T, bool)
Declaration
public static bool TryConvert<T>(object value, out T result, bool guaranteed)
Parameters
| Type |
Name |
Description |
| object |
value |
|
| T |
result |
|
| bool |
guaranteed |
|
Returns
Type Parameters