C# Class LightFramework.Core.ConvertHelper

ConvertHelpepr提供把字符串转换成具体的数据类型。
Mostra file Open project: xianrendzw/LightFramework.Net

Public Methods

Method Description
GetBoolean ( String str ) : bool
GetBoolean ( int value ) : bool

将整型变量转化为布尔变量(True或False).

GetByte ( String str ) : Byte
GetBytes ( String str ) : byte[]
GetDateTime ( String str ) : System.DateTime
GetDecimal ( String str ) : decimal
GetDouble ( String str ) : double
GetFloat ( String str ) : float
GetGuid ( String str ) : System.Guid
GetInt16 ( String str ) : short
GetInt32 ( String str ) : int
GetInt64 ( String str ) : System.Int64
GetSingle ( String str ) : System.Single

Method Details

GetBoolean() public static method

public static GetBoolean ( String str ) : bool
str String
return bool

GetBoolean() public static method

将整型变量转化为布尔变量(True或False).
public static GetBoolean ( int value ) : bool
value int 整型数
return bool

GetByte() public static method

public static GetByte ( String str ) : Byte
str String
return Byte

GetBytes() public static method

public static GetBytes ( String str ) : byte[]
str String
return byte[]

GetDateTime() public static method

public static GetDateTime ( String str ) : System.DateTime
str String
return System.DateTime

GetDecimal() public static method

public static GetDecimal ( String str ) : decimal
str String
return decimal

GetDouble() public static method

public static GetDouble ( String str ) : double
str String
return double

GetFloat() public static method

public static GetFloat ( String str ) : float
str String
return float

GetGuid() public static method

public static GetGuid ( String str ) : System.Guid
str String
return System.Guid

GetInt16() public static method

public static GetInt16 ( String str ) : short
str String
return short

GetInt32() public static method

public static GetInt32 ( String str ) : int
str String
return int

GetInt64() public static method

public static GetInt64 ( String str ) : System.Int64
str String
return System.Int64

GetSingle() public static method

public static GetSingle ( String str ) : System.Single
str String
return System.Single