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

Can a dictionary have duplicate keys c#?

477


What is a class in unity?

480


How does bitwise work?

497


What is the difference between properties and indexer in c#?

432


In dynamic link library, which api is used for load library?

519






What is web forms in c#?

497


Is arraylist type safe in c#?

497


Which class comes after the SortedList class?

564


My switch statement works differently! Why?

510


Can u list some style properties of List Box?

483


Why we use extension methods in c#?

466


If dll and exe files are same it means you can deploy both the files in gac?

493


Is boxing an implicit conversion?

535


Is null in c#?

479


Explain the process of polymorphism with an example?

466