January 26, 2015

Difference between String & string in C#

string is an alias for System.String.So technically, there is no difference.
It is recommended to use “string” any time if you're referring to an object.
Example:
string strLocation = "India";
Use String if you want to refer class.

No comments:

Post a Comment