对比的String.Empty"" [英] String.Empty versus ""
本文介绍了对比的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.
这篇关于对比的String.Empty""的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文