The StringBuilder Class
Solve issues related to immutability using StringBuilder.
We'll cover the following...
Introduction
The System.String
namespace offers a plethora of methods for handling text. We could even create our own text editor. Remember, though, that a new string is created any time we make a change to a string object. That’s the nature of strings, they are immutable. This can be a problem if our program handles large texts and makes many changes. Memory allocation is a costly operation in terms of memory and processing power.
There must be something dynamic and mutable, something that can be modified in-place instead of created from ...
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy