Introduction to the differences between String and string in c
- 2020-05-19 05:41:02
- OfStack
I don't know if you noticed that in c# string you can write string and String, so what's the difference?
string is a class in c#;
String is the class of Framework;
C# string maps to String of Framework.
If you use string, the compiler will compile it to String, so if you just use String you will save the compiler a little bit of work.
That is to say,
string is just another name for String
string is a class in c#;
String is the class of Framework;
C# string maps to String of Framework.
If you use string, the compiler will compile it to String, so if you just use String you will save the compiler a little bit of work.
That is to say,
string is just another name for String