Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String vs. StringBuilder
Message
De
30/05/2003 11:02:10
 
 
À
30/05/2003 09:33:32
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00794481
Message ID:
00794520
Vues:
14
Hi, Bill.

>Since all of the data is concatenated into the single string in one statement, does the rule to use a StringBuilder for multiple operations apply in this case?

Let me throw my guessing here (someone may jump in and tell something else):

The problem with string manipulation on VB6 ages was that "dynamic memory reallocation" was a killer machine. You know, the process in a loop of going to the memory, taking the variable, concatenating the string, and then putting it in the memory again...

That's when the StringBuilder comes for the rescue.

So, in my understanding of your sample, as you're throwing all the concatenated string at once to the memory, it doesn't seem that you're gonna benefit from using the StringBuilder.

Can someone tell if this is right or wrong?? :)
Claudio Lassala
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform