ISSUE #2029

    Unload 1% was not upgraded.

    Description 

    This issue was fixed automatically in the VBUC version 2.2 using Mobilize helper classes.

    Sample VB6 

    Dim i As Integer
        If Label1.Count <> 1 Then
       'Unload labels by their indexes
       For i = 1 To Label1.Count - 1
           Unload Label1(i)
       Next
    End If 

    Target VB.NET 

    If Label1.Length <> 1 Then
    'Unload labels by their indexes
    For i AsInteger = 1 To Label1.Length - 1
    ContainerHelper.UnloadControl(Me, "Label1", i)
    Next
    EndIf 

    Expected VB.NET 

    If Label1.Length <> 1 Then
    'Unload labels by their indexes
    For i AsInteger = 1 To Label1.Length - 1
    ContainerHelper.UnloadControl(Me, "Label1", i)
    Next
    EndIf 

    Target C# 

    if (Label1.Length != 1)
    {
    //Unload labels by their indexes
    for (int i = 1; i <= Label1.Length - 1; i++)
    {
    ContainerHelper.UnloadControl(this, "Label1", i);
    }
    } 

    Expected C# 

    if (Label1.Length != 1)
    {
    //Unload labels by their indexes
    for (int i = 1; i <= Label1.Length - 1; i++)
    {
    ContainerHelper.UnloadControl(this, "Label1", i);
    }
    }


    Download VBUC Free Trial
    Download VBUC Now

    It's time to eradicate VB6
    ROI of eradicating VB6

    8 Proven Tips for
    Planning a Successful Migration

    8 Tips for migration