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

Answer Posted / swati

In stringBuilder we can modify original value
example: suppose a string "Swti" in that string we add a
after charator w then we can easily add the char a after w
then new string is "Swati"

But in string we can't modify original value we add add
another value in original value use concate function.
example: suppose a string is "Swati" in that string we
concate another string means "Pandey" by using concate
function

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define delegation in .net?

680


Can we overload indexer in c#?

687


Can int be null in c#?

695


Why do we need collections in c#?

668


How to add controls dynamically to the form using c#.net.

683


What is the name of c# compiler?

865


Name the control which cannot be placed in mdi?

686


What is the base class in .net from which all the classes are derived from?

745


What is the difference between dynamic and var in c#?

691


How big is a 64 bit integer?

682


Is string nullable in c#?

702


What is thread pooling?

749


1. Describe page life cycle?

1845


Define using statement in c#?

720


Can I do things in il that I can't do in c#?

733