What is the Main difference between String and
StringBuilder and why do we use StringBuilder.

Answer Posted / mahesh

String and StringBuilder Both are classe for store the
strings.
String Builder is faster than String. String is immitable,
StringBuilder is mutable.

Is This Answer Correct ?    28 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the benefit of dependency injection c#?

670


What is inheritance c#?

683


If c# destructors are so different to c++ destructors, why did ms use the same syntax?

724


Explain why do I get an error (cs1006) when trying to declare a method without specifying a return type?

642


To allow an element to be accessed using a unique key which .NET collection class is used ?

841


What is parse method in c#?

638


How do you specify a custom attribute for the entire assembly (rather than for a class)?

735


What is difference between first and firstordefault?

700


what is collections in .net? why we use?

1896


Explain briefly the difference between value type and reference type?

762


Why singleton is sealed?

653


What is use of a HashTable in .NET?

909


Can you change the value of a constant filed after its declaration?

713


In c#, what will happen if you do not explicitly provide a constructor for a class?

739


How does insertion sort work?

724