"Alan" <al*************@yahoo.com.au> wrote:
Is there any difference in these:
private string string1;
private String string2:
I found the colors of the 'string' and 'String' are different.
'string' is a keyword in C#, so it is colored as a keyword. String is
refers to the type System.String, so it's colored as a class.
C#'s 'string' keyword is, by definition, an alias for System.String, so
there is no semantic difference between the two.
There is a syntactic difference: you can declare an identifier called
'String', but you cannot create an identifier called 'string'.
-- Barry
--
http://barrkel.blogspot.com/