Possible Duplicate:
In C# what is the difference between String and string
String vs string in C#
I am using .Net Framework 4.0
I have a query for syntax. I can declare the string variable in two ways like below.
1. String str = null;
2. string str = null;
Somebody suggested me to go for first one. Is it the reason like looking good or any differences also ?
stringis an alias forSystem.String(which is what your first line uses). They compile the same.The only reason to go with one over the other is convention. Pick one and stick with it.