What's the advantage of using System.Text.StringBuilder over
System.String?
Answer Posted / article
Hi..
Mutable & Immutable
1)string is immutabel.
i.e. whenever you create any changes to a string a new
object is created in memory.
2)StringBuilder has advantage String
To overcome this the stringBuilder is provided we can make
ammendments to the stringBuilder object without creating a
new object. Therefore whenever a lot operations are to be
made on a string then StringBuilder should be used in place
of String.
Thank's
Pradhan Prasanta Kumar
http://globaltouch.in
| Is This Answer Correct ? | 9 Yes | 3 No |
Post New Answer View All Answers
Explain how caching in asp.net 2.0 is different from caching in asp.net 1.1?
What is virtual directory in asp.net?
How to add DateTime Control in normal DataGrid Server Control?
What is difference between viewstate and session in asp net?
What is difference between web api and web services?
What are the advantages of the code-behind feature?
What is a viewbag?
Is asp.net core faster?
Can you explain autopostback?
Differentiate between Server.Transfer and Response.Redirect with functionality? Why we can choose one over the other?
What is custom events? How to create it?
Explain asp.net page life cycle?
Does asp.net still recognize the global.asa file?
Explain advantages of caching?
Can I tap into other windows livetm services?