What are the differences between system.string and system.text.stringbuilder classes?



What are the differences between system.string and system.text.stringbuilder classes?..

Answer / Amit Jain

System.String is an immutable string class, while System.Text.StringBuilder is a mutable string class. StringBuilder is more efficient for large strings that need to be modified frequently as it doesn't create new objects for each modification.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Why we can't create the object of abstract class ?

15 Answers   Assyst, CTS, HCL, IBM, L&T,


What is the difference between String s(Small s) and String S(Capital S)?

4 Answers  


So let's say I have an application that uses myapp.dll assembly, version 1.0.0.0. There is a security bug in that assembly, and I publish the patch, issuing it under name myapp.dll 1.1.0.0. How do I tell the client applications that are already installed to start using this new myapp.dll?

1 Answers  


how do you do exception management

4 Answers   Accenture, HCL,


Explain copy constructor?

1 Answers   Accenture,


Name the property of the textbox which cannot be changed at runtime?

1 Answers  


To create a localized application which namespaces are necessary?

1 Answers   Siebel,


Is a valid int value?

1 Answers  


What does using do in c#?

1 Answers  


What is the use of convert toint32 in c#?

1 Answers  


What is difference between float and integer?

1 Answers  


What is sqldatareader c#?

1 Answers  


Categories