What’s the advantage of using System.Text.StringBuilder
over System.String?

Answer Posted / panchdev

stringbuilder:-
1-This class represents a string-like object whose value is a mutable sequence of characters.
2- The value is said to be mutable because it can be modified once it has been created by appending, removing, replacing, or inserting characters. For comparison, see the String class.
3-The default capacity for this implementation is 16, and the default maximum capacity is Int32.
string:-
1-A String object is called immutable (read-only) because its value cannot be modified once it has been created. Methods that appear to modify a String object actually return a new String object that contains the modification. If it is necessary to modify the actual contents of a string-like object, use the System.Text.StringBuilder class.

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

mention what is csdl, ssdl and msl sections in an edmx file?

572


what is entity graph in entity framework?

619


In Server how to check whether model has error or not in ASP.Net MVC

623


What is net framework 3.0 ?

590


What type of filter does outputcacheattribute class represents?

668






What is ViewData and TempData in ASP.Net MVC?

573


What is the .net framework 3.0 (formerly winfx)?

552


Can we change web.config settings from iis?

553


Describe the .net framework architecture.

575


How does the .net framework 3.0 relate to the .net framework 2.0?

553


What is route config?

555


What are child actions in ASP.Net MVC?

580


Explain what languages does the .net framework support?

516


what is entity framework?

595


Can you explain the page life cycle of mvc?

555