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


Please Help Members By Posting Answers For Below Questions

Why to use “{resource}.axd/{*pathinfo}” in routing in mvc?

575


What are the advantages of razor view engine?

531


Why should we go for entity framework?

529


Explain Sections is ASP.Net MVC?

596


What symbol would you use to denote, the start of a code block in razor views?

573






what is ssdl?

685


Can I add mvc testcases in visual studio express?

596


Explain what is asp.net mvc?

660


Name a few different return types of a controller action method?

545


What is .net framework & its benefits?

526


how to disable the lazy loading framework?

595


Difference between ASP.NET MVC and ASP.NET WebForms?

567


What are the 3 main components of an asp.net mvc application?

543


how do you truncate a table using entity data model?

590


Will there be a .net compact framework 3.0 release with release of .net framework 3.0?

546