String is immutable, which means it cannot be changed after it’s created. By assigning another value to the
string, it will create a new string object instead of updating the string at the same memory address.
So to modify the string either by appending text or change text etc. StringBuilder is a perfect choice.
C# provided StringBuilder under the System. Text namespace.
String Builder is a mutable one; it means the string value can be changed after it’s created using the same
object. It modifies the string using the helper methods like append, removes, etc. making it easy for string
manipulations.
Both String & String builders are reference types.
Example:
The output will be: