摘要:
1,String.IsNullOrEmpty 方法指示指定的字符串是null还是Empty字符串。语法:public static bool IsNullOrEmpty( string value)参数value类型:System.String要测试的字符串。返回值类型:System.Boolean如果value参数为null或空字符串 (""),则为true;否则为false。IsNullOrEmpty是一种简便方法,它使您能够同时测试String是否为null或其值是否为Empty。result = s == null || s == String.Empty;示例:下 阅读全文