Just wanted to point out that if you put:
OPTION STRICT ON
at the top of your VB code, the background compiler will hilight anywhere you didn't declare variables (and lots of other optimizations) so that you can find these things while editing...
yag
>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?