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.StringBuilder classes?

Answer Posted / sundarchum

Both the String and StringBuilder class are used to store
strings. One exception is when we change the value in the
string it will create a new String object is creating in
memory and assign the new value.

eg: String name = "Sundar";

A new name object is creating in memory and the
value "Sundar Rahul" is assinging to the newly created
space.

eg: String name = "Sundar Rahul";

But StringBuilder class occupies the same space even if you
change the value.

StringBuilder gives you better performance than String
class when you perform string manipulations like string
concatenation.

You can use StringBuilder's Append() method to use
concatenation and for String use "+".

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What the different phase/steps of acquiring a proxy object in webservice?

931


What is the difference between mobile application and desktop application?

842


What is exe in c#?

875


Does c# have its own class library?

921


What is difference between write and writeline in c#?

858


Wcf and what is difference between wcf and web services?

898


Give an example of removing an element from the queue?

896


Explane each and every methods of nterface Queue? Explain About performance issues on retrieving records

1001


What is inumerable?

975


What is the advantage of constructor?

847


What does dbml stand for?

964


What is null in database?

829


What is the difference between an application domain and a process?

955


How do I open the console?

946


What is constants in c#?

838