Metoda "<methodname1>" nie może zaimplementować częściowej metody "<methodname2>", ponieważ metoda "<methodname3>" już implementuje ją

Metoda "<methodname1>" nie może zaimplementować częściowej metody "<methodname2>", ponieważ metoda "<methodname3>" już ją implementuje. Tylko jedna metoda może zaimplementować metodę częściową.

Nie można mieć dwóch częściowych metod implementujących tę samą deklarację metody częściowej. Poniższy kod powoduje ten błąd.

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  

Identyfikator błędu: BC31434

Zobacz też