Esempio n. 1
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));
 }
Esempio n. 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));
 }
Esempio n. 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));
 }