using in lass StringBuilder

Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Thread Solved
Reply

Join Date: Oct 2008
Posts: 63
Reputation: polo_coins is an unknown quantity at this point 
Solved Threads: 0
polo_coins polo_coins is offline Offline
Junior Poster in Training

using in lass StringBuilder

 
0
  #1
Dec 4th, 2008
I discovered that there is a such class like StringBuilder
but I don't find any thing that convince me to use it.
Explain me it's advantage and disadvantage and if you gave some examples I like to see them

thanks a lot Sergey
Last edited by polo_coins; Dec 4th, 2008 at 4:49 am.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: using in lass StringBuilder

 
0
  #2
Dec 4th, 2008
String builder can have advantages when buidling up output. So instead of a ton of

s += titletext;
s += "\r\n--------";

etc

you can just do
sb.append(newtext);
sb.appendline("---------");

it acts almost like a buffer, however if you've done much coding before it does feel unnecessary and isnt the way your brain is used thinking.
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 63
Reputation: polo_coins is an unknown quantity at this point 
Solved Threads: 0
polo_coins polo_coins is offline Offline
Junior Poster in Training

Re: using in lass StringBuilder

 
0
  #3
Dec 4th, 2008
[QUOTE=LizR;750021]String builder can have advantages when buidling up output. So instead of a ton of

s += titletext;
s += "\r\n--------";

etc

you can just do
sb.append(newtext);
sb.appendline("---------");

it acts almost like a buffer, however if you've done much coding before it does feel unnecessary and isnt the way your brain is used thinking.[/QUO
thanks LIZR
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC