在.NET4.0及更高版本中存在string.IsNullOrWhiteSpace(string)时,在检查字符串时使用string.IsNullOrEmpty(string)是否被视为不良做法? 最佳答案 最佳做法是选择最合适的。.NetFramework4.0Beta2hasanewIsNullOrWhiteSpace()methodforstringswhichgeneralizestheIsNullOrEmpty()methodtoalsoincludeotherwhitespacebesidesemptystring.Th