Il metodo '<nomemetodo1>' non può implementare il metodo parziale '<nomemetodo2>' perché è già implementato da '<nomemetodo3>'

Aggiornamento: novembre 2007

Messaggio di errore

Il metodo '<nomemetodo1>' non può implementare il metodo parziale '<nomemetodo2>' perché è già implementato da '<nomemetodo3>'. Un metodo parziale può essere implementato da un solo metodo.
Method '<methodname1>' cannot implement partial method '<methodname2>' because '<methodname3>' already implements it. Only one method can implement a partial method.

Non è possibile avere due metodi parziali che implementano la stessa dichiarazione del metodo parziale. Nel codice seguente viene generato questo errore.

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 errore: BC31434

Vedere anche

Concetti

Metodi parziali