What is the difference between String and string in C#?

后端 未结 30 3929
走了就别回头了
走了就别回头了 2020-11-21 04:35

Example (note the case):

string s = \"Hello world!\";
String s = \"Hello world!\";

What are

30条回答
  •  孤独总比滥情好
    2020-11-21 05:15

    string and String are identical in all ways (except the uppercase "S"). There are no performance implications either way.

    Lowercase string is preferred in most projects due to the syntax highlighting

提交回复
热议问题