While running benchmark tests this morning, my colleagues and I discovered some strange things concerning performance of C# code vs. VB.NET code.
Off on a tangent, if you're up and running with VS2010, you can take advantage of PLINQ and make C# (probably VB.Net as well) faster.
Change that for loop to...
var range = Enumerable.Range(2, 5000000);
range.AsParallel()
.ForAll(i => testIfPrimeSerial(i));
I went from 7.4 -> 4.6 seconds on my machine. Moving it to release mode shaves a little more time on top of that.