Udostępnij za pośrednictwem


Partial methods must be declared 'Private' instead of '<accessModifier>'

The access modifier Private is required in partial method declarations. The following example shows the use of Private in the 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

Error ID: BC31431

To correct this error

  • Change the access modifier to Private in the signature and implementation declarations.

See Also

Concepts

Partial Methods