On Mar 11, 5:17 pm, "Bogdan" <bog...@domain.comwrote:
As a mainly C/C++ and Java developer I was quite surprised when I realized
that C# compiler takes both "string" and "String" types. C# is case
sensitive so I'm a bit puzzled by that. Could someone please explain that
or point me to on-line docs?
Actually C# doesn't understand a String type. It does understand a
System.String type, and you can refer to that as just String, if you
happen to have a
using System;
statement at the top of your file (and it is some time since I saw a
C# file that /didn't/ have such a statement).
C# does understand the 'string' type, which it internally converts to
System.String32 (much as it converts 'short' to System.Int16).
My personal preference is to always use the C# names, unless I want to
emphasize the exact length of an integer (in which case, I'll use
System.Int64 or whatever).