██████████████████████████████████████████████████████████████████████


Que:::: What is the difference between System.String and System.StringBuilder classes?

2 comments:

Unknown said...

A String "A" when edited by adding a new string "B" to it will be creating a new instance and storing the string "AB" in a new memory location discarding "A". StringBuilder on the other hand is preferred because the new string is added to the current string in the same location.

Unknown said...

string builder s more efficent in the cases where a lot of manipulation s done to the text string are immutiable,so each time its being operatingon a new instance s created