Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
string is an alias for System.String. You can compare with int and System.Int32. Therefore, there is no difference. Is that the highlight of the word is different. String will highlight as a class.
Let's reduce the question to "How is string different from String?"
https://docs.microsoft.com/en-us/dotnet/csharp/lan...
string is a keyword for a standard data type defined in the language standard, String (aka System.String) is a class provided by CTS . In C# code, these are the same, but it's better to use string.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question