Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String vs. StringBuilder
Message
From
30/05/2003 12:28:09
 
 
To
30/05/2003 11:02:10
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00794481
Message ID:
00794577
Views:
17
Hi Claudio,

Thanks for the input and yes, that would be my understanding also. However, all the documentation I have seen on this issue is somewhat vague on this particular scenario so I posted the question hoping one of the "gurus" or simply someone who is cognizant of how the underlying code works would ante up. :-)

I would like to understand this issue for the sake of understanding it and for future reference, but this has specific relevance for me because I am doing this very thing in an ASP.NET page to store some user entered data in bulk form on the back end. I am currently using the string approach since it is simpler and I doubt there would be much performance hit in this case even if it is an issue, but I would like to know in case performance issues surface.

Bill

>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?? :)
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform