StringBuilder.Append Vs StringBuilder.AppendFormat

前端 未结 9 1350
轮回少年
轮回少年 2021-01-31 15:30

I was wondering about StringBuilder and I\'ve got a question that I was hoping the community would be able to explain.

Let\'s just forget about code readability, which o

9条回答
  •  滥情空心
    2021-01-31 16:12

    Of course profile to know for sure in each case.

    That said, I think in general it will be the former because you aren't repeatedly parsing the format string.

    However, the difference would be very small. To the point that you really should consider using AppendFormat in most cases anyway.

提交回复
热议问题