- INDEX VB TO NET
- KNOWLEDGE BASE
- EWIS-ISSUES
- ISSUE #1056
ERR_RUNTIME #1056
As 1% was removed from ReDim 2% statement.
Description
In Visual Basic 6.0 the ReDim statement can be used to declare dynamic array variables, or even change the types of the elements contained in an array. In VB.NET the ReDim statement cannot be used to change the type of a preexisting variable.
For more information visit:
- ReDim Statement (Visual Basic .NET): http://msdn.microsoft.com/en-us/library/w8k3cys2(v=VS.100).aspx
- ReDim Statement for Visual Basic 6.0 Users: http://msdn.microsoft.com/en-US/library/tbbx2zbe(v=VS.90).aspx
Recommendations
Sample VB6
Dim v As Variant Dim w(3) As Integer w(2) = 3 v = w ReDim v(5) As Byte
Target VB.NET
Expected VB.NET
Dim w(3) As Integer w(2) = 3 Dim v(5) As Integer