您可以使用静态string.IsNullOrEmpty方法:
var test = string.Empty
if (string.IsNullOrEmpty(test))
{
// There is nothing in the string or its null
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
77 次 |
| 最近记录: |