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
If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?
what is complex type?
What are the components required to create a route in mvc?
What is session state management?
What is connected scenario? : Entity framework
What is edm designer? : Entity framework
Which are the important namespaces used in ASP.Net MVC?
Explain dependency resolution?
What are actions in asp.net mvc?
Describe the gac in the .net framework.
How to enable Attribute Routing?
will there be any issues adding a table without primary keys to a data model?
What is entity framework in asp net?
Explain what languages does the .net framework support?
What is ViewData and TempData in ASP.Net MVC?