![]() |
|
|
#1 |
|
Guest
Posts: n/a
|
Re: convert generic string list to one string
thank you for the concern. That has been take care of. I am using
stringboard and its append method. "Marc Gravell" <marc.gravell@gmail.com> wrote in message news:f2dcfc93-36b6-4cef-b73a-e0a2357e643f@d27g2000prf.googlegroups.com... > > starting with empty string > > If you do really mean "string" here, then note that this may be more > than a little inefficient, due to the immutability of strings (so your > loop would create *lots* of GEN0 objects, and consume telescoping > memory (i.e. n1 + [n1+n2] + [n1+n2+n3] + [n1+n2+n3+n4] + ... if you > see what I mean [give-or-take the separators]). > String concatenation inside a loop is an ideal candidate for > StringBuilder (which is supported under CF). > > Explanation: www.pobox.com/~skeet/csharp/stringbuilder.html > > Of course, if you aren't actually using "string" concatenation then it > isn't an issue. > > Marc > |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Re: convert generic string list to one string
oops, pressed the enter key instead of backspace while correcting the
StingBuilder typo. my apology.. "GS" <gsmsnews.microsoft.comGS@msnews.Nomail.com> wrote in message news:eBHW67oPIHA.4584@TK2MSFTNGP03.phx.gbl... > thank you for the concern. That has been take care of. I am using > stringboard and its append method. > > "Marc Gravell" <marc.gravell@gmail.com> wrote in message > news:f2dcfc93-36b6-4cef-b73a-e0a2357e643f@d27g2000prf.googlegroups.com... > > > starting with empty string > > > > If you do really mean "string" here, then note that this may be more > > than a little inefficient, due to the immutability of strings (so your > > loop would create *lots* of GEN0 objects, and consume telescoping > > memory (i.e. n1 + [n1+n2] + [n1+n2+n3] + [n1+n2+n3+n4] + ... if you > > see what I mean [give-or-take the separators]). > > String concatenation inside a loop is an ideal candidate for > > StringBuilder (which is supported under CF). > > > > Explanation: www.pobox.com/~skeet/csharp/stringbuilder.html > > > > Of course, if you aren't actually using "string" concatenation then it > > isn't an issue. > > > > Marc > > > > |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|