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
How we can add the CSS in ASP.Net MVC?
What are actions in asp.net mvc?
what is minimum requirement for entity framework applications to run?
What is entity framework used for?
How to bind table colum with gridview column?
What is main objective of asp.net mvc 4 or what is new in mvc4 ?
Explain dependency resolution?
Is .net framework going away?
What are the difference between asynchronous controller implementation between asp.net mvc 3 & asp.net mvc 4?
What is Separation of Concerns in ASP.NET ASP.Net MVC?
Explain the role of assembly in the .net framework.
Does Tempdata hold the data for other request in ASP.Net MVC?
how do you mark a property as required? For example, for a project, the name is a required field.
What are the 3 segments of the default route, that is present in an ASP.NET MVC application?
explain lazy loading, eager loading, and explicit loading?