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

Where would you use an ihttpmodule, and what are the limitations if any?

618


Explain about Multi-Language integration?

688


How many types of cache are there?

621


Explain the difference between Repeater and Data list control in ASP.NET?

712


Can one dll file contains the compiled code of more than one .net language?

634






How to prevent client side validation from the ASP.NET validation controls?

666


How to use multiple scriptmanager controls in a web page?

714


What is asp according to you?

619


Differentiate between a page theme and a global theme?

608


What is the difference between debug and release?

610


What is app_code folder in asp net?

626


What are the benefits of view state?

648


What are the various types of validation controls provided by asp.net?

626


What are the memory-mapped files?

625


What is http request and response?

616