This project is read-only.

error ....Error Too few type arguments to 'System.Action(Of T)

Apr 8, 2010 at 5:11 AM

i create new project and copy code from dotnetzip

it error at ....

Private Sub ResetUI()
        If btnCancel.InvokeRequired Then
 >>>>           btnCancel.Invoke(New Action(AddressOf ResetUI), New Object() {})
            btnUnzip.Enabled = True
            btnZipBrowse.Enabled = True
            btnExtractDirBrowse.Enabled = True
            btnCancel.Enabled = False
            tbZipToOpen.Enabled = True
            tbExtractDir.Enabled = True
            ProgressBar1.Maximum = 1
            ProgressBar1.Value = 0
        End If
    End Sub



Apr 8, 2010 at 3:52 PM

Check the documentation on using the Action delegate from VB.NET.

I think you want....

Dim target As Action
target = AddressOf ResetUI

But you may be able to simplify that...