[...]
"string" is not a System.Type object, it is an alias for a declarator
of type System.String
You keep misusing that term "declarator".
And you are right, both of them do return the same thing - a
System.Type.String object (as opposed to a System.String object).
There is no such things as "System.Type.String".
You may want to look up the C# grammar because it's a declaration
statement.
I not only looked up the C# grammar, I posted an excerpt in my reply to
you. And it clearly states that the text "string" is called a "type", and
not a "declarator" or "declaration statement.
You declare a variable like so:
string SomeString = "Characters";
Thus "string" is the type declarator,
No, it's not.
"SomeString" is called the
identifier, and "Characters" is called the initializer.
That's correct.
If you feel like pouring through it here's the MSDN page:http://
msdn.microsoft.com/en-us/library/aa664812.aspx
The section looks like this:
variable-declarator:
identifier
identifier = variable-initializer
I have the feeling you don't understand how to read the grammar
description. What the above means is that the thing called a
"variable-declarator" can either be an "identifier", or an "identifier =
variable-initializer". In other words, in your example:
string SomeString = "Characters";
The "variable-declarator" is this part:
SomeString = "Characters";
The type isn't part of it at all.
[...]
In other words there's a difference between:
string LoanNumber;
...and...
System.Type.String
Yup, big difference. The former compiles, and the latter doesn't.
Pete
The later most assuredly does compile, IF used correctly.
Please provide a concise-but-complete code example where
"System.Type.String" compiles.
Like I said
above, and you did bring up a point that makes the difference much
more apparent. There is a difference between:
System.String and System.Type.String
That's true, but the difference is not what you seem to think it is.
Pete