Interview Questions

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

C# Interview Questions and Answers


(Continued from previous question...)

86. What is the advantage of using System.Text.StringBuilder over System.String?

StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it is being operated on, a new instance is created.

(Continued on next question...)

Other Interview Questions