C#判断数组是否为空

string[] array=new[] { "1", "2", "3", "4", "5" };

//包含空字符串或NULL返回True

bool any = array.Any(x => string.IsNullOrEmpty(x));

 

posted @ 2015-04-10 10:39  柒喵  阅读(10289)  评论(0编辑  收藏  举报