c# - String.Empty 与 ""

标签 c#

<分区>

Possible Duplicate:
What is the difference between String.Empty and “”

String.Empty"" 有何不同?

最佳答案

没有什么不同。

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

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

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 either null or String.Empty, use the IsNullOrEmpty method.

关于c# - String.Empty 与 "",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2905378/

相关文章:

c# - 在 ASP.NET Core 和 .NET Core 控制台项目中使用相同的 `.resx` 文件

c# - N-Teir 架构与 ASP.NET Web API

c# - 在 .NET 中,finally 是否等同于 try-catch-throw?

c# - MongoDb C# 驱动程序是否适用于 LINQ 和动态文档?

c# - 从 ViewModel 绑定(bind)的 ObservableCollection 不更新 View

c# - 管理数据库中持久的动态网站设置

c# - JSON.NET 反序列化客户端

c# - 如何在 C# ASP.NET 中等待异步

c# - 如何防止存储过程错误在 SqlClient 中抛出异常?

c# - YouTube API v3 检查视频处理状态