Example (note the case):
string s = \"Hello world!\";
String s = \"Hello world!\";
What are
String
stands for System.String
and it is a .NET Framework type. string
is an alias in the C# language for System.String
. Both of them are compiled to System.String
in IL (Intermediate Language), so there is no difference. Choose what you like and use that. If you code in C#, I'd prefer string
as it's a C# type alias and well-known by C# programmers.
I can say the same about (int
, System.Int32
) etc..