3
Reply

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

Ravi Kumar

Ravi Kumar

17y
5.6k
0
Reply

    when you perform any operation on string then a new object is created and hence it is said that strings are immutable where as in StringBuilder same object is used again and again.

    when you perform any operation on string then a new object is created and hence it is said that strings are immutable where as in StringBuilder same object is used again and again.

    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.