In C#, string is an alias for the String class in .NET framework. In fact, every C# type has an equivalent in .NET. ... The only tiny difference is that if you use the String class, you need to import the System namespace on top of your file, whereas you don't have to do this when using the string keyword.
Example (note the case):
string s = "Hello world!";
String s = "Hello world!";
What are the guidelines for the use of each? And what are the differences?
Asked by Shailesh Chaudhary on 03/25/2019 Score: 808 points