#region 转Int
///
/// 将string类型转换成int类型
///
/// 目标字符串
/// 默认值
///
public static int StringToInt(string s, int defaultValue)
{
if (!string.IsNullOrWhiteSpace(s))
{
int result;
if (int.TryParse(s, out result))
return result;
}
return defaultValue;
}
///
/// 将string类型转换成int类型
///
/// 目标字符串
///
public static int StringToInt(string s)