Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What’s the difference between System.String and
System.Text.StringBuilder classes with example

Answer Posted / puneet mishra

according to me difference between a string class and using String Builder is that in using a string class you need to create new object befour appending it to the main string but in string builder class one don`t need to create object every time

Example for string builder class:
using System.Text;

stringBuilder str = new stringBuilder;
str.append("");

in the previous example once u create str as new instance of string builder class u just have to append every thing in to the string

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is garbage collection? How to force garbage collector to run?

905


Explain the accessibility modifier protected internal?

858


In c#, what will happen if you do not explicitly provide a constructor for a class?

961


What is the difference between CreateObject() and GetObject()?

1121


How are delegates chosen?

891


What are the 3 different types of arrays?

1031


What is difference between internal and protected internal in c#?

941


How do you specify a custom attribute for the entire assembly (rather than for a class)?

956


What is unsigned int?

898


What are the advantages of clr procedure over t-sql procedure?

997


Can you inherit multiple abstract classes in c#?

936


Which class does the remote object has to inherit?

1062


What is boxing and unboxing in c#?

852


What do you mean by string objects are immutable?

999


What is out int in c#?

905