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

Why are strings immutable in c#?

699


What is an escape sequence?

719


Can dictionary have duplicate keys c#?

698


Why is c# better than java?

703


What are the desktop applications?

673


Should I use double or float?

702


What is a private method in c#?

712


Are c# strings null terminated?

748


What is object pool in .net?

734


Which operator cannot be overloaded in c sharp?

688


What is predicate builder?

707


What is multiple interface in c#?

749


What is data quality assurance?

661


What is an inheritance ?Give an example in which inheritance is used?

783


What is form feed in c#?

752