Interview Questions

What’s the advantage of using System.Text.StringBuilder over System.String?

C# Interview Questions and Answers


(Continued from previous question...)

157. What’s the advantage of using System.Text.StringBuilder over System.String?

StringBuilder is more efficient in cases where there is a large amount of string manipulation. Strings are immutable, so each time a string is changed, a new instance in memory is created.


(Continued on next question...)

Other Interview Questions