C# Class ExcelDna.Registration.TypeConversion

Show file Open project: Excel-DNA/Registration Class Usage Examples

Public Methods

Method Description
ConvertToBoolean ( object value ) : bool
ConvertToDateTime ( object value ) : System.DateTime
ConvertToDecimal ( object value ) : decimal
ConvertToDouble ( object value ) : double
ConvertToInt16 ( object value ) : short
ConvertToInt32 ( object value ) : int
ConvertToInt64 ( object value ) : long
ConvertToString ( object value ) : string
ConvertToUInt16 ( object value ) : ushort
GetConversion ( Expression input, Type type ) : Expression
GetConversion ( Type inputType, Type targetType ) : LambdaExpression
GetDefault ( Type type ) : object

Method Details

ConvertToBoolean() public static method

public static ConvertToBoolean ( object value ) : bool
value object
return bool

ConvertToDateTime() public static method

public static ConvertToDateTime ( object value ) : System.DateTime
value object
return System.DateTime

ConvertToDecimal() public static method

public static ConvertToDecimal ( object value ) : decimal
value object
return decimal

ConvertToDouble() public static method

public static ConvertToDouble ( object value ) : double
value object
return double

ConvertToInt16() public static method

public static ConvertToInt16 ( object value ) : short
value object
return short

ConvertToInt32() public static method

public static ConvertToInt32 ( object value ) : int
value object
return int

ConvertToInt64() public static method

public static ConvertToInt64 ( object value ) : long
value object
return long

ConvertToString() public static method

public static ConvertToString ( object value ) : string
value object
return string

ConvertToUInt16() public static method

public static ConvertToUInt16 ( object value ) : ushort
value object
return ushort

GetConversion() public static method

public static GetConversion ( Expression input, Type type ) : Expression
input System.Linq.Expressions.Expression
type System.Type
return System.Linq.Expressions.Expression

GetConversion() public static method

public static GetConversion ( Type inputType, Type targetType ) : LambdaExpression
inputType System.Type
targetType System.Type
return System.Linq.Expressions.LambdaExpression

GetDefault() public static method

public static GetDefault ( Type type ) : object
type System.Type
return object