What's the advantage of using System.Text.StringBuilder over
System.String?
Answers were Sorted based on User's Feedback
Answer / prathap
StringBuilder is more efficient in the cases, where a lot of
manipulation is done to the text. Strings are immutable, so
each time it's being operated on, a new instance is created.
| Is This Answer Correct ? | 23 Yes | 1 No |
Answer / 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 |
Answer / abhinay kumar
stiringbuilder is mutable but string is immutable
i.e mutable means that if we define a variable with
stringbuilder and assigne the value to another
stringbuilder variable and if we change the value then the
reflaction will be seen on the both variable (it made
change on the same memory location reference)
immutable means if we define a variable with string and
assigne the value to another string variable and if we
change the value then the reflaction will not be seen on
the both variable
| Is This Answer Correct ? | 3 Yes | 0 No |
How does a content page differ from a master page?
What is boxing and unboxing?
What is ispostback method in asp.net? Why do we use that?
Explain current thinking around IClonable.
How many types cache in asp net?
List the events in page life cycle.
Which class is used to send an email message from an ASP.NET Web page?
0 Answers Sans Pareil IT Services,
How many types of sessions are there?
what is view state and its use
10 Answers DELL, Efextra, HCL,
What is the difference between file-based dependency and key-based dependency?
How can we prevent an aspx page get refreshed when any information fetch from the database ?
benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)