What’s the advantage of using System.Text.StringBuilder
over System.String?
Answer Posted / jhansi
String..
1.Its a class used to handle strings.
2.Here concatenation is used to combine two strings.
3.String object is used to concatenate two strings.
4.The first string is combined to the other string by
creating a new copy in the memory as a string object, and
then the old
string is deleted
5.we say "Strings are immutable".
String Builder..
1.This is also the class used to handle strings.
2.Here Append method is used.
3.Here, Stringbuilder object is used.
4.Insertion is done on the existing string.
5.Usage of StringBuilder is more efficient in case large
amounts of string manipulations have to be performed
| Is This Answer Correct ? | 40 Yes | 3 No |
Post New Answer View All Answers
What are Code Blocks in Views?
Explain peek method in tempdata in asp.net mvc?
what is split entity?
Explain the advantages of dependency injection (di) in asp.net mvc?
What are Scaffold templates in ASP.Net MVC?
What are the 2 popular asp.net mvc view engines?
How does work clr?
What “beforFilter()”,“beforeRender” and “afterFilter” functions do in Controller?
What are actions in asp.net mvc?
Is .net framework going away?
Can you Write the GC(Garbage Collector) Algoritham in .NET? (But not Explination of Working of GC).
What you mean by routing in mvc?
Can you use Razor code in Javascript in ASP.Net MVC?
What is latest version of .net framework?
What is the .net framework?