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

Explain the difference between Web Garden and Web Farm?

550


Explain login controls.

619


Can I recieve both html markup for page and code in the asp.net web page's source code portion in the web browser?

538


What is page request in asp.net?

526


If you want to bind the columns manually within the asp:datagrid tags what kind of tags you have to add.

621






Define tracing.

628


What is the purpose of master page?

516


What is Web API?

647


What’s difference between “optimistic” and “pessimistic” locking?

577


Tell me how asp.net mvc differs from asp.net web forms? : asp.net mvc

556


How we implement web farm and web garden concept in asp.net?

541


What is authorization in asp.net?

575


What is the full form of asp.net?

533


A Web Service Can Only Be Written In .net. Is it True??

639


What is mta?

629