Why is there String/string and Object/object in C#? [duplicate]
Possible Duplicate:
String vs string in C#
I know there is no differen开发者_StackOverflow中文版ce between using string and String. But, why is there the option in C#? Is it the same for object and Object?
EDIT
Note, that I am asking why.
In the MS implementation of the C# standards, string maps to System.String and object maps to System.Object. In other implementations, this could map to other classes. So if you use string and object, you are on the safer side if you should ever compile it with another compiler.
string
is just an alias for System.String
. It is just a shorthand the same way that int
is shorthand for System.Int32
.
精彩评论