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

What are satellite assemblies? How will you get the different language strings?

711


What are circular references?

716


How to use exception handling in stored procedure?

751


What is meant by generics in c#?

682


Can I get the name of a type at runtime?

752


Why would you use a class property in c#?

690


Why use a singleton instead of static methods?

648


What are properties in C#?

727


How can an inner class access the members of outer class?

736


What is addressof operator?

722


C# called c sharp why?

767


i want the csharp questions&answeres

1698


What are primitive types in c#?

731


Distinguish between system.string and system.text.stringbuilder classes?

688


What is concrete class in c#?

657