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 is MVVM design pattern?
how can you tell ef to have a different table or column name than that defined for the class?
mention what is the difference between ado.net and classic ado?
What are the sub types of ActionResult?
how do you mark a property as required? For example, for a project, the name is a required field.
Describe the roles of clr in .net framework.?
Can you please explain the request flow in ASP.NET MVC framework?
What is entity framework? : Entity framework
How we can add the CSS in ASP.Net MVC?
What are the 3 main components of an asp.net mvc application?
Explain peek method in tempdata in asp.net mvc?
I want ask from plz smaple example code for Biztalkk server
What is the role of the jit compiler in .net framework?
Explain the difference between viewbag and viewdata in mvc?
Can you explain renderbody and renderpage in asp.net mvc?