C# Class ResumeFactory.Common.DataTypeConverter

不引发异常的类型转换
Show file Open project: vincentlauvlwj/FrameDAL

Public Methods

Method Description
ToDecimal ( this input, decimal &output ) : bool
ToDecimal ( this input, decimal defaultValue ) : decimal
ToDouble ( this input, double &output ) : bool
ToDouble ( this input, double defaultValue ) : double
ToInt32 ( this input, int &output ) : bool
ToInt32 ( this input, int defaultValue ) : int
isDecimal ( this input ) : bool

判断输入是否为小数

isInt ( this input ) : bool

判断输入是否为整数

isNumber ( this input ) : bool

判断输入是否为数字

Method Details

ToDecimal() public static method

public static ToDecimal ( this input, decimal &output ) : bool
input this
output decimal
return bool

ToDecimal() public static method

public static ToDecimal ( this input, decimal defaultValue ) : decimal
input this
defaultValue decimal
return decimal

ToDouble() public static method

public static ToDouble ( this input, double &output ) : bool
input this
output double
return bool

ToDouble() public static method

public static ToDouble ( this input, double defaultValue ) : double
input this
defaultValue double
return double

ToInt32() public static method

public static ToInt32 ( this input, int &output ) : bool
input this
output int
return bool

ToInt32() public static method

public static ToInt32 ( this input, int defaultValue ) : int
input this
defaultValue int
return int

isDecimal() public static method

判断输入是否为小数
public static isDecimal ( this input ) : bool
input this
return bool

isInt() public static method

判断输入是否为整数
public static isInt ( this input ) : bool
input this
return bool

isNumber() public static method

判断输入是否为数字
public static isNumber ( this input ) : bool
input this
return bool