Udostępnij za pośrednictwem


'AddressOf' cannot be applied to 'methodname' because 'methodname' is a partial method

A partial method has been passed to the AddressOf operator. Partial methods are invalid values for the AddressOf operator.

Error ID: BC31440

To correct this error

  • Add an implementation method for the partial method. The implementation method is a valid value for the AddressOf operator. The following example shows a partial method signature and its implementation.

    ' Definition of the partial method signature.
    Partial Private Sub OnNameChanged()
        ' The body of the signature is empty.
    End Sub
    
    ' Implementation of the partial method.
    Private Sub OnNameChanged()
        MsgBox("Name was changed to " & Me.Name)
    End Sub
    

See Also

Concepts

Partial Methods

Reference

AddressOf Operator