Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB x C# with StringBuilder
Message
From
17/05/2002 06:52:53
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
VB x C# with StringBuilder
Miscellaneous
Thread ID:
00658061
Message ID:
00658061
Views:
51
Hi, everybody.

Some months ago, I´ve made some testings to look at the performance of VFP 7 and VB 6 on the string concatenation... by that time, with some research, I discovered about the "dynamic memory allocation" problem of VB 6.

Now, I just teste such thing, but with VFP, C# and VB.NET. As I was reading, VS.NET provides the StringBuilder class, in order to speedup this sort of thing. Well, I´ve run this code in C#:
StringBuilder SB = new StringBuilder();

int i=1;

while (i != 30000)
{
SB.Append("Hi"+i.ToString());
SB.Append(" blah blahblah blahblah blahblah blahblah blahblah blah ");
i++;
}
and in VB:
Dim SB = New System.Text.StringBuilder()

Dim i

For i = 1 To 30000

  SB.Append("Hi" + i.ToString())
  SB.Append(" blah blahblah blahblah blahblah blahblah blahblah blah ")
Next
As I´m not a VBer, and I´m just starting study C#, I don´t know if that´s the correct way of doing things... anyway, for what people are saying, such code must have similar performance... but, that wasn´t what I saw.

Any comments?
Claudio Lassala
Next
Reply
Map
View

Click here to load this message in the networking platform