+ 12
What are the differences between "string" and "String"?
I'm just wandering that a string with big 'S' and a string with small 's' are both accepted in c#. Are they really the same or different?
2 Respostas
+ 13
"String" and "string" both refer to the same thing so they aren't different from each other, but some people prefer to use the one and others prefer the other. Performance wise they aren't different, so it's mainly what you prefer to do.
+ 12
As a guidline, use string when creating a variable and String when referring to the String class.
e.g. string s = String.Concat("Hello ", "World");
Source: http://stackoverflow.com/a/7077