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
Explain dependency resolution?
What is Differnce between html.action and ajax.action?
What are the components of the .net framework.
My organization went through the approval process of supporting the .net framework 2.0 in production. Do we need to go through the same process all over again for the .net framework 3.0? Do I need to do any application compatibility testing for my .net framework 2.0 applications?
What is .net framework used for?
Can you Write the GC(Garbage Collector) Algoritham in .NET? (But not Explination of Working of GC).
If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?
How do you assign a value to a complex number 7 how has exception hand changed in .net framework 4.0?
What is the use of the default route {resource}.axd/{*pathinfo} ?
Possible ways to prevent xss attacks on mvc application?
What are action filters?
What symbol would you use to denote, the start of a code block in razor views?
What is domain class model?
What is partialview in asp.net mvc?
What is an asynchronous controller in asp.net mvc?