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
mention what is csdl, ssdl and msl sections in an edmx file?
what is entity framework advantage?
Explain the advantages of dependency injection (di) in asp.net mvc?
What is the difference between windows vista and .net framework 3.0 ?
What is the use of action filters in an mvc application?
How can we determine action invoked from HTTP GET or HTTP POST?
How do I use partial view?
Explain the tools used for unit testing in ASP.Net MVC
What symbol would you use to denote, the start of a code block in razor views?
which are the key concepts of entity data model?
Mention what is the difference between “ActionResult” and “ViewResult” ?
What is rxjava used for?
what is use of entitydatasource control?
Can you explain model, controller and view in mvc?
What are sections?