Class Converts<T>
Provides various methods related to Convert based on give T.
public static class Converts<T>
Type Parameters
T
- Inheritance
-
Converts<T>
- Inherited Members
Methods
From(bool)
Converts bool to T using staticly cached FindConverter<TIn, TOut>().
public static T From(bool obj)
Parameters
Returns
- T
A
T
From(byte)
Converts byte to T using staticly cached FindConverter<TIn, TOut>().
public static T From(byte obj)
Parameters
Returns
- T
A
T
From(char)
Converts char to T using staticly cached FindConverter<TIn, TOut>().
public static T From(char obj)
Parameters
Returns
- T
A
T
From(decimal)
Converts decimal to T using staticly cached FindConverter<TIn, TOut>().
public static T From(decimal obj)
Parameters
Returns
- T
A
T
From(double)
Converts double to T using staticly cached FindConverter<TIn, TOut>().
public static T From(double obj)
Parameters
Returns
- T
A
T
From(short)
Converts short to T using staticly cached FindConverter<TIn, TOut>().
public static T From(short obj)
Parameters
Returns
- T
A
T
From(int)
Converts int to T using staticly cached FindConverter<TIn, TOut>().
public static T From(int obj)
Parameters
Returns
- T
A
T
From(long)
Converts long to T using staticly cached FindConverter<TIn, TOut>().
public static T From(long obj)
Parameters
Returns
- T
A
T
From(float)
Converts float to T using staticly cached FindConverter<TIn, TOut>().
public static T From(float obj)
Parameters
Returns
- T
A
T
From(string)
Converts string to T using staticly cached FindConverter<TIn, TOut>().
public static T From(string obj)
Parameters
Returns
- T
A
T
From(ushort)
Converts ushort to T using staticly cached FindConverter<TIn, TOut>().
public static T From(ushort obj)
Parameters
Returns
- T
A
T
From(uint)
Converts uint to T using staticly cached FindConverter<TIn, TOut>().
public static T From(uint obj)
Parameters
Returns
- T
A
T
From(ulong)
Converts ulong to T using staticly cached FindConverter<TIn, TOut>().
public static T From(ulong obj)
Parameters
Returns
- T
A
T
ToBoolean(T)
Converts T to bool using staticly cached FindConverter<TIn, TOut>().
public static bool ToBoolean(T obj)
Parameters
objTThe object to convert to bool
Returns
ToByte(T)
Converts T to byte using staticly cached FindConverter<TIn, TOut>().
public static byte ToByte(T obj)
Parameters
objTThe object to convert to byte
Returns
ToChar(T)
Converts T to char using staticly cached FindConverter<TIn, TOut>().
public static char ToChar(T obj)
Parameters
objTThe object to convert to char
Returns
ToDecimal(T)
Converts T to decimal using staticly cached FindConverter<TIn, TOut>().
public static decimal ToDecimal(T obj)
Parameters
objTThe object to convert to decimal
Returns
ToDouble(T)
Converts T to double using staticly cached FindConverter<TIn, TOut>().
public static double ToDouble(T obj)
Parameters
objTThe object to convert to double
Returns
ToInt16(T)
Converts T to short using staticly cached FindConverter<TIn, TOut>().
public static short ToInt16(T obj)
Parameters
objTThe object to convert to short
Returns
ToInt32(T)
Converts T to int using staticly cached FindConverter<TIn, TOut>().
public static int ToInt32(T obj)
Parameters
objTThe object to convert to int
Returns
ToInt64(T)
Converts T to long using staticly cached FindConverter<TIn, TOut>().
public static long ToInt64(T obj)
Parameters
objTThe object to convert to long
Returns
ToSingle(T)
Converts T to float using staticly cached FindConverter<TIn, TOut>().
public static float ToSingle(T obj)
Parameters
objTThe object to convert to float
Returns
ToString(T)
Converts T to string using staticly cached FindConverter<TIn, TOut>().
public static string ToString(T obj)
Parameters
objTThe object to convert to string
Returns
ToUInt16(T)
Converts T to ushort using staticly cached FindConverter<TIn, TOut>().
public static ushort ToUInt16(T obj)
Parameters
objTThe object to convert to ushort
Returns
ToUInt32(T)
Converts T to uint using staticly cached FindConverter<TIn, TOut>().
public static uint ToUInt32(T obj)
Parameters
objTThe object to convert to uint
Returns
ToUInt64(T)
Converts T to ulong using staticly cached FindConverter<TIn, TOut>().
public static ulong ToUInt64(T obj)
Parameters
objTThe object to convert to ulong