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

Answer Posted / article

Hi..

Mutable & Immutable

1)string is immutabel.
i.e. whenever you create any changes to a string a new
object is created in memory.
2)StringBuilder has advantage String
To overcome this the stringBuilder is provided we can make
ammendments to the stringBuilder object without creating a
new object. Therefore whenever a lot operations are to be
made on a string then StringBuilder should be used in place
of String.

Thank's
Pradhan Prasanta Kumar
http://globaltouch.in

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does viewstate work?

797


What is a web farm?

768


What does session_start () do?

832


What is http session state?

709


What is asp net theme?

743


How can we create pie chart in asp.net?

821


Just by seeing the signature of the bean how can you specify whether it is a stateful or stateless session bean?

757


What does the .webpart file do?

787


How would you get asp.net running in apache web servers?

735


What is the default Orientation property in a Menu control?

783


What is the difference between mechine.config and web.config?

992


Why we use dbms for projects? Why don’t we save any application data in separate files instead of dbms?

789


Explain culture and uiculture values.

765


Define repository pattern in asp.net mvc? : asp.net mvc

704


In the Repeater control which way you can edit?

862