Metode parsial harus memiliki bodi metode kosong

Bodi deklarasi tanda tangan metode parsial tidak boleh berisi kode apa pun. Contoh berikut menunjukkan tanda tangan metode parsial dan penerapannya.

' 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

ID Kesalahan: 31435

Untuk memperbaiki kesalahan ini

  • Hapus kode apa pun dari deklarasi metode parsial.

Lihat juga