对比的String.Empty""

问题描述:

可能重复:结果
是什么的String.Empty和&ldquo之间的差异;”的

是如何从 的String.Empty 不同的

How is String.Empty different from ""?

这是没有什么不同。

http://msdn.microsoft.com/en-us/library/system.string.empty.aspx

此字段的值是零长度字符串,

The value of this field is the zero-length string, "".

在应用程序代码,本场是最常用的任务用于将一个字符串变量初始化为空字符串。为了测试字符串的值是否为的String.Empty,使用IsNullOrEmpty方法

In application code, this field is most commonly used in assignments to initialize a string variable to an empty string. To test whether the value of a string is String.Empty, use the IsNullOrEmpty method.