I recently read that in StringWriter and StringReader are used for writing and reading from StringBuilder.
Well when I use StringBuilder Object, it looks to be a self sufficient class.
We have every way of reading and writing the StringBuilder, using
StringBuilder.Append(), Insert(), Replace(), Remove() etc...
- What is the possible use of
StringWriterandStringReader, which cannot be done byStringBuilderitself? - What is the practical use of them?
- What could be the possible reason they are not taking up
Streamas the input (Because any other writer and reader are taking the stream as the Constructor parameter to operate on) but theStringBuilder?