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
Can a constructor be static in c#?
Which property do we set on a Combo Box to display data on it prior to setting the DataSource ?
What is an escape sequence in c#?
How do I format a string in c#?
What is data adapter in c#?
Explain copy constructor?
What is the ouput of the following program?
What is expression c#?
How can we sort the elements of the array in descending order?
Can we set image Source dynamically using C# in WPF application?
Explain how do you directly call a native function exported from a dll?
What do constructors do in c#?
Will the following code compile?
What is the difference between asp net and c#?
Explain acid rule of thumb for transactions in c#.