Possible Duplicate:
String vs string in C#
What is the difference Between String and string or Double and double?
if i use :
double s1; or
if i use Double s1;
can you give pros and cons?
Possible Duplicate:
String vs string in C#
What is the difference Between String and string or Double and double?
if i use :
double s1; or
if i use Double s1;
can you give pros and cons?
string is just the C# alias for the System.String class. The same is true for all the other built-in language types like:
As far as usage conventions go, I completely agree with this answer on SO.
Related resources:
See : string (Référence C#)
According to MSDN :
The string type represents a sequence of zero or more Unicode characters. string is an alias for String in the .NET Framework.
In short, no difference, as one is a sugar syntax for the other.
string
is an alias for System.String
. It doesn't matter whether you use String
or string
. It's in the end translated into System.String
anyway.
It's the same case as with System.Int32
and int
etc.
Here is the list of all aliases.