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

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

Example (note the case):

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

What are

30条回答
  •  我寻月下人不归
    2020-11-21 05:27

    As the others are saying, they're the same. StyleCop rules, by default, will enforce you to use string as a C# code style best practice, except when referencing System.String static functions, such as String.Format, String.Join, String.Concat, etc...

提交回复
热议问题