El método "<nombreDeMétodo1>" se debe declarar como "Private" para poder implementar el método parcial "<nombreDeMétodo2>"

La implementación de un método parcial debe declararse Private. Por ejemplo, el código siguiente causa este error.

Partial Class Product  
  
    ' Declaration of the partial method.  
    Partial Private Sub valueChanged()  
    End Sub  
  
End Class  
Partial Class Product  
  
    ' Implementation of the partial method, with Private missing,
    ' causes this error.
    'Sub valueChanged()  
    '    MsgBox(Value was changed to " & Me.Quantity)  
    'End Sub  
  
End Class  

Identificador de error: BC31441

Para corregir este error

  1. Use el modificador de acceso Private en la implementación del método parcial, tal como se muestra en el ejemplo siguiente.
Private Sub valueChanged()  
    MsgBox("Value was changed to " & Me.Quantity)  
End Sub  

Consulte también