O'Reilly logo

Microsoft® Visual Basic® .NET 2003 Kick Start by Joel Semeniuk, Erik Porter, Andy Baron, Duncan Mackenzie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Data Type Changes

In the move to .NET, Visual Basic's data types were adjusted in a couple of ways. I will go into more detail on integers and variants, but here is a quick summary of the changes:

  • The Currency data type has been removed completely, but you can use the Decimal data type instead.

  • Date values in Visual Basic 6.0 were stored as Doubles, and programmers often manipulated them as such, but in Visual Basic .NET DateTime values are stored as 64-bit integers instead. If you need to convert a .NET DateTime value into or from a Double, you can use the System.DateTime.ToOADate or FromOADate methods.

  • Integers were 16-bit values in VB6, they are now 32-bit. Longs have also moved from 32-bit to 64-bit, and a new data type (Short) has been added ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required