Possible Duplicate:
In C# what is the difference between String and string
In C# there are two string types. (The same for booleans, object, ect.). One that begins with upperc开发者_JAVA百科ase and one lowercase. String and string. They seem to have the same methods.
So whats is the difference between them?
string
is a keyword, while System.String
is a class. You can consider string
to be an alias for System.String
.
There is one difference... you can't use String without using System;
beforehand.
What is the difference between String and string in C#?
精彩评论