Possible Duplicate:
What is the difference between String and string
I’m using string for a variable, like this
string myString = "test";
And I’m using String if I want to use some methods(?) of the Class String
String.Format...
I thought this is looking better. Buy some people are doing stuff like
String myString;
string.Format...
Its working. But I don’t like this. How can I tell them to stop? Is there “C# rule” for stuff like this? The same thing for int,Int; char,Char; …
stringis a C# alias toSystem.String.If writing C#, you should be using the alias, so
string.Formatandstring myString.Both end up compiled to the same IL and mean the same thing, but C# has its idioms and using the type alias is part of them – in the same way that you would use
intand notSystem.Int32.