Immutable versus Mutable string in C#
String is also immutable, so each time we assign to same variable a new value, old string is being disposed and new is created inside memory that leads to increased resource consumption. We can overcome this issue by using following method of the string object. Concat, Join, or Format. Or even better we use mutable StringBuilder class. Most of the time you choose between these two if you know how long your string is going to be. If you are creating short string then user String if length is unknown to you and you are building dynamic string then use StringBuilder which is more efficient and you don’t need to create multiple instances of the string object.