![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
public static class StringExtend
{
public static bool IsNullOrEmpty(this string s)
{
return string.IsNullOrEmpty(s);
}
public static bool IsInt(this string s)
{
int i;
return int.TryParse(s, out i);
}
public static int ToInt(this string s)
{
return int.Parse(s);
}
}
{
public static bool IsNullOrEmpty(this string s)
{
return string.IsNullOrEmpty(s);
}
public static bool IsInt(this string s)
{
int i;
return int.TryParse(s, out i);
}
public static int ToInt(this string s)
{
return int.Parse(s);
}
}