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?

Answers were Sorted based on User's Feedback



What?s the difference between System.String and System.StringBuilder classes?..

Answer / 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

What?s the difference between System.String and System.StringBuilder classes?..

Answer / guest

System.String is immutable, System.StringBuilder was
designed with the purpose of having a mutable string where a
variety of operations can be performed

Is This Answer Correct ?    2 Yes 0 No

What?s the difference between System.String and System.StringBuilder classes?..

Answer / akash

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 ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Is everything an object c#?

0 Answers  


6. If we assign a value in textbox on Page_UnLoad event, will it display?

2 Answers   Mphasis,


Does C# supports multi-dimensional arrays?

3 Answers   Microsoft,


What is stringwriter c#?

0 Answers  


Do we get an error while executing the “finally” block in c#?

0 Answers  


What is the task perform by clr?

0 Answers  


Is a c# interface the same as a c++ abstract class?

0 Answers  


How is the memory managed in C#.

1 Answers  


Why do canadians say zed?

0 Answers  


What is args c#?

0 Answers  


What are bitwise logical operators?

0 Answers  


What is the difference between namespace and class?

0 Answers  


Categories