In VB6 you have two different kinds of arrays, static and dynamic. A VB6 static array is defined by means of a DIM keyword that specifies lower and upper indexes, whereas a dynamic array is defined by means of a DIM keyword with empty parenthesis

    Dim arr1(10) As Integer     ' a static array
    Dim arr2() As Integer       ' a dynamic array

The key difference between static and dynamic arrays is that you can't change the size of a static array. VB.NET supports both syntax forms, but in all cases it creates dynamic arrays.

However, there is another, less obvious difference between static and dynamic arrays under VB6, which becomes apparent when you apply the Erase keyword to the array. When you erase a static array all the array elements are reset to zero, empty string, or nothing; when you erase a dynamic array all items are destroyed and you can't access any element until you REDIM-ension the array.

Previous versions of VB Migration Partner didn't account for this minor detail, which is also ignored by all other VB6 conversion tools on the market. In upcoming 1.21 version, VB Migration Partner generates a slightly different code when the original VB6 array was static:

    ClearArray6(arr1)   ' a static array
    Erase6(arr2)        ' a dynamic array

Unfortunately, it isn't possible to fill the gap between VB6 and VB.NET in all cases. In fact, if the array is one of the parameters of the current method, VB Migration Partner has no way to determine whether the client is passing a static or a dynamic array, because the same method can be passed arrays of both types. For this reason, it assumes that the array is dynamic and uses the Erase6 method, but it additionally generates a warning to alert the developer of the potential problem.