String output: format or concat in C#?

前端 未结 30 2060
一生所求
一生所求 2020-11-22 11:40

Let\'s say that you want to output or concat strings. Which of the following styles do you prefer?

  • var p = new { FirstName = \"Bill\", LastName = \"Ga

30条回答
  •  星月不相逢
    2020-11-22 12:11

    I think this depends heavily on how complex the output is. I tend to choose whichever scenario works best at the time.

    Pick the right tool based on the job :D Whichever looks cleanest!

提交回复
热议问题