String Flashcards
1
Q
Why do we use StringBuilder?
A
- A String object is immutable
- using any methods of the System.String class –> creates a new string object in memory
- when you need to perform repeated modifications to a string, we need StringBuilder class.
- StringBuilder is a dynamic object