Variables must be explicitly declared
In Visual Basic 6.0, it was possible to declare a group of variables in a single Dim statement. A common usage was to declare a series of letters as integer values:
In Visual Basic .NET, each variable must be individually declared; the DefBool, DefByte, DefInt, DefLng, DefCur, DefSng, DefDbl, DefDec, DefDate, DefStr, DefObj, and DefVar statements are no longer supported.
During upgrade, any variables declared using these statements are explicitly declared as the correct type as shown in the following example:
' Visual Basic 6.0 DefInt A-C ' After upgrade to Visual Basic .NET ' UPGRADE_NOTE: DefInt A-C statement was removed. Variables were explicitly declared as type Short. Dim A As Short Dim B As Short Dim C As Short
What to do next
- No further action is necessary. This note was added to make you aware of the syntax change and the changes made to your code.