分部方法签名声明的主体不能包含任何代码。 下面的示例演示了分部方法签名及其实现。
' 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: 31435
更正此错误
- 从分部方法声明中删除任何代码。