方法:
public static bool IsNullOrEmpty(string value)
{
   if (value != null)
   {
       return (value.Length == 0);
   }
   return true;
}

如果 string.IsNullOrEmpty("  ") 其实返回为 false.


例:
string AA=" ";

string.IsNullOrEmpty(A) =false

string.IsNullOrEmpty(Trim(A)) =true

相关文章:

  • 2022-12-23
  • 2021-06-12
  • 2021-06-07
  • 2021-12-10
猜你喜欢
  • 2021-10-07
  • 2022-12-23
  • 2022-02-14
  • 2021-08-22
  • 2022-12-23
相关资源
相似解决方案