IsNullOrEmpty 判断字符串是否为null或者空


static void Main(string[] args) { string s1 = "张三"; if(string.IsNullOrEmpty(s1)) { Console.WriteLine("是的"); } else { Console.WriteLine("不是"); } Console.ReadKey(); }
IsNullOrEmpty 判断字符串是否为null或者空
static void Main(string[] args) { string s1 = "张三"; if(string.IsNullOrEmpty(s1)) { Console.WriteLine("是的"); } else { Console.WriteLine("不是"); } Console.ReadKey(); }
转载于:https://www.cnblogs.com/amixc/p/4023193.html