First of All, both string
& String
are not same.There is a difference:String
is not a keyword and it can be used as an identifier whereas string
is a keyword and cannot be used as identifier.
I am trying to explain with different example :First, when I put string s;
into Visual Studio and hover over it I get (without the colour):
That says that string is System.String
, right?The documentation is at https://msdn.microsoft.com/en-us/library/362314fe.aspx. The second sentence says "string is an alias for String in the .NET Framework.".