I ran a very simple test. I built a VB.NET app that looped 50,000,000 times changing the value of myClass.element each time. It took 20 sec in the IDE and 20 sec compiled.

I ran the same test using VB6 which ran in 29 sec (IDE) and 25 sec (compiled).

Then in VB6 I changed the class to a UDT (myUDT.element) and it ran in 5 sec (IDE) and 1 sec (compiled).

Does this surprise anyone? It did me, because I thought classes were supposed to be tons more efficient in VB.NET

Also why was there no difference between the IDE and compiled runtimes for the VB.NET test?

Is there such a thing as UDTs in VB.NET? How do you implement them?