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

Explain about WSDL

603


What is binding in c#?

499


Explain the difference between pass by value and pass by reference.

553


What is system console writeline in c#?

477


what is IEquatable

569






Is string a class in c#?

483


What is parallel programming in c#?

498


What is ienumerable and iqueryable?

511


What is datasource c#?

497


Why do we need properties in c#?

495


What is appdomain in c#?

494


Explain acid rule of thumb for transactions in c#.

528


While debugging a C# application can you change the value of a variable?

546


what is be the overhead, if i use binary transmission. and will it be sent using xml text or how ?

1692


What are the boolean data types in c#?

514