StringWriter or StringBuilder

后端 未结 7 1955
盖世英雄少女心
盖世英雄少女心 2020-12-08 00:17

What is the difference between StringWriter and StringBuilder and when should I use one or the other?

7条回答
  •  南方客
    南方客 (楼主)
    2020-12-08 00:18

    The StringBuilder class is basically a mutable string, a helper class to construct an immutable string. The StringWriter is built on top to add more convenience functions for string formatting.

提交回复
热议问题