字符串的复习

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

        static void Main(string[] args)
        {
            string s1 = "张三";
            if(string.IsNullOrEmpty(s1))
            {
                Console.WriteLine("是的");
            }
            else
            {
                Console.WriteLine("不是");
            }
            Console.ReadKey();
        }
IsNullOrEmpty

 

posted @ 2014-10-13 21:58  amixc  阅读(164)  评论(0编辑  收藏  举报