Partilhar via


O método '< methodname1 >' não é possível implementar o método parcial '< methodname2 >' porque '< methodname3 >' já o implementa.

Mensagem de erro

Método '<methodname1>' não pode implementar o método parcial '<methodname2>' porque '<methodname3>' já o implementa.Apenas um método pode implementar um método parcial.

Você não pode ter dois métodos parciais que implementam a mesma declaração de método parcial.O código a seguir causa esse erro.

Partial Class Product

    ' Declaration of the partial method.
    Partial Private Sub ValueChanged()
    End Sub

End Class
Partial Class Product

    ' First implementation of the partial method.
    Private Sub ValueChanged()
        MsgBox(Value was changed to " & Me.Quantity)
    End Sub

    ' Second implementation of the partial method causes this error.
    'Private Sub ValueChanged()
    '    Console.WriteLine("Quantity was changed to " & Me.Quantity)
    'End Sub

End Class

ID de erro: BC31434

Consulte também

Conceitos

Métodos parciais