Like many new C# programmers, one question I asked was “What is the difference between string and String in C#?”
Difference between string and String
Technically there is no difference between string and String. string keyword is an alias for the String class in .NET Framework. It’s like int and System.Int32.
string msg="Hello World";
String msg1="Hello World";
If you need to use String class, you need to import the System namespace to your code.
If you enjoyed this post, let me know by leaving a comment below.