What is the Main difference between String and
StringBuilder and why do we use StringBuilder.
Answer Posted / praveen kumar a
Strings are so heavily used in all programming languages
that we do not think about them very much.Normally all goes
well but sometimes we need more performance so we switch to
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.).
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is attribute c#?
What is c sharp used for?
What's the difference between class and object?
What are the steps for creating clr trigger
What is routing in c#?
What is the difference between firstordefault and singleordefault?
What is data hiding in c#?
Why is c# used?
What is difference between string and stringbuilder in c#?
What are the three types of predicates?
What is difference between abstraction and encapsulation in c#?
Does console.writeline() stop printing when it reaches a null character within a string?
Is 0 an unsigned integer?
What is datasource c#?
What is strong data type in c#?