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
Do you know about the new features in asp.net mvc 4 (asp.net mvc4)?
What is definingquery in entity framework? : Entity framework
What is a model in programming?
How the ‘page lifecycle’ of ASP.Net MVC does works?
List the new features added in .net framework 4.0.
Describe the roles of clr in .net framework.?
sql related question (outer join, left, right etc) array vs hashtable CRL sqldatareader vs dataset what is WPF, WCF, compare to WinForms Webservices Asp.net MVC vs WebForms?
Can I uninstall microsoft .net framework?
What is the .net framework?
Which filter executes first in an asp.net mvc application?
Explain what platforms does the .net framework run on?
What is the use of view model in asp.net mvc?
How to use Jquery Plugins in ASP.Net MVC validation?
What is entity framework firstordefault?
If I have multiple filters implemented, what is the order in which these filters get executed?