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 DIFFERENCE BETWEEN STRING AND STRING BUILDER ?

Answer Posted / raviraj

String and String Builder class shows resemblance in terms
of values they accept(that contain series of haracters).But
the thing that distinguishes them is that string is
immutable .Immutable in the sense it will create a new copy
of memory whenever a new string is concatenated to the
existing string variable That means the existing memory is
deleted and replaced by the new memory.Whereas
Stringbuilder is mutable whenever we append a new string to
the existing string variable using append method the memory
containing the original string is extended to contain the
new string as well i.e, it won`t replace it with new memory
allocation.Hence performing string concatenations within
the same variable in the string class variables will affect
their performance.

Is This Answer Correct ?    17 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the do while loop code?

908


What is boxing in c#?

962


What do you mean by string objects are immutable?

979


Is javascript harder than c#?

945


Why linq is having select clause at the end?

897


How does c# generics and c++ templates compare?

901


How many bytes is an int?

887


What is a linked list c#?

873


What is the purpose of static?

959


What is public or shared assemblies ?

998


How does insertion sort work?

901


what is inheritance and an example in vb.net and c# of when you might use it?

929


What is file extension of webservices?

1028


Explain About delegates

1011


Explain the difference between arraylist and array and in c#?

927