Here is a good reason to migrate to C# for all you VB guys out there
As you can see on the screenshot, the VB .NET generates FAR MORE methods than you can see with your naked eye, you can only see them by disassembling the code with IL Disassembler, this results in slow loading time, big memory usage and very fixed code, you clearly see that if you use C# you have a lot more control on your application resources.
The C# version uses 4608 bytes (4608 because it's a fixed PE format, but actually it uses only 10% of 4608 bytes)
While the VB version uses 13 824
I included the sample projects, you can download them here
C# Executable Source:
static void Main() { System.Console.WriteLine("Hello World"); }VB Executable Source:
The aspect of VB is pretty cool; it's a simple programming language, its easy to use and it allows you to create advanced application basically in no time, but by using it you get a lot of bad habits, making it harder for you to learn other (more advanced) programming languages.
Module Module1 Sub Main() System.Console.WriteLine("Hello World") End Sub End Module
So here is the conclusion: don't use VB even if it's powerful and easy to use, because under its hood it's really rotting, and you can clearly see that inside the ILASM code.
I used VB.NET before, but after all I started using VB after using C++ , ruby and assembler for some years, so I kinda realized, what it was like.
And stopped before it was too late.
P.S. check on the blog for more info on this case later (I'm working on a C# vs VB.net benchmark)
Back to Home
