Most efficient way to concatenate strings?

后端 未结 17 1215
野趣味
野趣味 2020-11-22 03:04

What\'s the most efficient way to concatenate strings?

17条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 03:41

    It's also important to point it out that you should use the + operator if you are concatenating string literals.

    When you concatenate string literals or string constants by using the + operator, the compiler creates a single string. No run time concatenation occurs.

    How to: Concatenate Multiple Strings (C# Programming Guide)

提交回复
热议问题