Best way to break long strings in C# source code

后端 未结 10 1581
伪装坚强ぢ
伪装坚强ぢ 2021-02-03 18:47

I am wondering what is the \"best practice\" to break long strings in C# source code. Is this string

\"string1\"+
\"string2\"+
\"string3\"

con

10条回答
  •  萌比男神i
    2021-02-03 19:44

    There´s any way to do it. My favorete uses a string´s method´s from C#. Sample One:

    string s=string.Format("{0} {1} {0}","Hello","By"); result is s="Hello By Hello";

提交回复
热议问题