Exemple #1
0
 /// <summary>
 /// string型转换为decimal型
 /// </summary>
 /// <param name="strValue">要转换的字符串</param>
 /// <param name="defValue">缺省值</param>
 /// <returns>转换后的int类型结果</returns>
 public static decimal StrToDecimal(object strValue, decimal defValue)
 {
     return(TypeParse.StrToDecimal(strValue, defValue));
 }
Exemple #2
0
 /// <summary>
 /// string型转换为float型
 /// </summary>
 /// <param name="strValue">要转换的字符串</param>
 /// <param name="defValue">缺省值</param>
 /// <returns>转换后的int类型结果</returns>
 public static float StrToFloat(object strValue, float defValue)
 {
     return(TypeParse.StrToFloat(strValue, defValue));
 }
Exemple #3
0
 /// <summary>
 /// string型转换为bool型
 /// </summary>
 /// <param name="strValue">要转换的字符串</param>
 /// <param name="defValue">缺省值</param>
 /// <returns>转换后的bool类型结果</returns>
 public static bool StrToBool(object Expression, bool defValue)
 {
     return(TypeParse.StrToBool(Expression, defValue));
 }
Exemple #4
0
 /// <summary>
 /// 将对象转换为Int32类型
 /// </summary>
 /// <param name="strValue">要转换的字符串</param>
 /// <param name="defValue">缺省值</param>
 /// <returns>转换后的int类型结果</returns>
 public static int StrToInt(object Expression, int defValue)
 {
     return(TypeParse.StrToInt(Expression, defValue));
 }
Exemple #5
0
 public static bool IsDouble(object Expression)
 {
     return(TypeParse.IsDouble(Expression));
 }