What is the Main difference between String and
StringBuilder and why do we use StringBuilder.
Answer Posted / dinesh sharma
String bulider Can Be Used When More Than One String Can we
concatenated.
StringBuilder which is more efficient because it does
contain a mutable string buffer. .NET Strings are immutable
which is the reason why a new string object is created
every time we alter it (insert, append, remove, etc.).
StringBulider Is more Effiecent Then String B'Cuse It
Provide Some Standered Function like Append,Reverse,Remove
etc.
| Is This Answer Correct ? | 179 Yes | 24 No |
Post New Answer View All Answers
What is difference between c and c sharp?
How can we set the class to be inherited, but prevent the method from being over-ridden?
Describe the types of comments in c#?
What is meant by generics in c#?
I want to print "Hello" even before main() is executed. How will you achieve that?
What is interface c#?
Define method overloading in c#?
What is the use of static members with example using c#.net.
Does c# support const methods, properties, or events?
Could you explain the difference between func vs action vs predicate?
Can properties be private in c#?
What is a deadlock lock?
How to declares a two-dimensional array in C#?
What is the difference between serialization and deserialization in c#?
What is the difference between select and selectmany?