服務(wù)熱線
153 8323 9821
指示指定的字符串是 null 還是 Empty 字符串。其實(shí)就是判斷字符串是空引用,或值為空。如剛定義一個(gè)字符串就是Empty(空)的。
命名空間: System
程序集: mscorlib(在 mscorlib.dll 中)
result = s == null || s == String.Empty;
語(yǔ)法:
public static bool IsNullOrEmpty(
string value
)