Difference between string.Empty and String.Empty in C#
This question already has an answer here:
It is the same. string
is an alias of class System.String
.
some common aliases:
object ==> System.Object
string ==> System.String
bool ==> System.Boolean
int ==> System.Int32
float ==> System.Single
double ==> System.Double
decimal ==> System.Decimal
char ==> System.Char
String.Empty
and string.Empty
are same. String
is the BCL class name. string
is the C#...shortcut if you will. Same as with Int32 and int.
Both are SAME except that string
is treated as a keyword
with Blue
color (default) and System.String
is a Class
with Green
Color (default) in the VS editor.
Underlying implementation are all the same. In other words points to the same.
链接地址: http://www.djcxy.com/p/3602.html上一篇: 在C#中Int64和long有什么区别?