In this short article I will clear a common doubt faced by developers i.e. what is the difference between small string and capital String data types in C# .Net.
Now the question arises:
1. What is the difference between string and String?
2. Which one to use and when?
So the answer is both are one and the same and both can be used. But it is recommended to use the shorter version i.e. string as that is the alias for the class System.String.
In other words the String represents the System.String class while the string is the keyword for the System.String that we can use to create string objects.
Here’s the MSDN reference for the different keywords for different classes Built-In Types Table
Difference between small string and capital String in C# .Net