更新时间:2023-02-22 13:18:33
如果(string.IsNullOrEmpty(MyString的)){
//
}
Possible Duplicate:
Easier way of writing null or empty?
I am looking for the simplest way to do a check. I have a variable that can be equal to "" or null. Is there just one function that can check if it's not "" or null?
if (string.IsNullOrEmpty(myString)) {
//
}