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

Answer Posted / ashwini choudhari

string class u can't directly the change the string value
and u want to do some manipulation with the string object
then it's give the new memory in stack when u can the do
the manipulation with the string object but in String
Builder class not happened to give the new memory
allocation in stack it just repalcing the some part of
string which u want repalce or appended so that the
performances increases.
Actually String Builder it is referneces type .

Is This Answer Correct ?    11 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

code for arranging given number in possible permutation ways ex:123,321,312,132,231,213.

1951


What is the difference between malloc () and new?

688


Describe ado.net?

770


How does aspect oriented programming work?

729


What are the benefits of using generics?

698


What does addressof operator do in background ?

794


What is difference between c and c sharp?

677


What is the difference between values and reference types?

710


What are the generation of Garbage Collection in C# .NET ?

746


What is a callback c#?

753


Describe two uses of the “using” statement during the operation of c#?

737


What is data binding with example?

724


What is yield c#?

656


What can we do to handle multiple exceptions?

764


How do I do implement a assert?

727