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 is the Main difference between String and
StringBuilder and why do we use StringBuilder.

Answer Posted / shaveen kaushal

Difference..
String..
1.Its a class used to handle strings.
2.Here concatenation is used to combine two strings.
3.String object is used to concatenate two strings.
4.The first string is combined to the other string by
creating a new copy in the memory as a string object, and
then the old
string is deleted
5.we say "Strings are immutable".

String Builder..
1.This is also the class used to handle strings.
2.Here Append method is used.
3.Here, Stringbuilder object is used.
4.Insertion is done on the existing string.
5.Usage of StringBuilder is more efficient in case large
amounts of string manipulations have to be performed

Regards
Sridhar R
Nothing is illegal, Until You Get Caught

Is This Answer Correct ?    39 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How big is a 64 bit integer?

903


What floating point types is supported in C#?

1035


Explain the difference between “system.array.clone()” and “system.array.copyto()” in c#?

928


What is difference between float and integer?

995


what is a destructor?

988


How can we make a thread sleep for infinite period ?

1004


Is c# scripting language?

900


Explain the difference between pass by value and pass by reference.

956


What does void mean in c#?

980


How long has c# been around?

992


Which are access modifiers available in c#?

954


What is difference between assembly and dll?

975


What are the fundamental differences between value types and reference types?

1073


What is the difference between method and function in c#?

915


Why can't we use a static class instead of singleton?

880