分部方法必须具有空方法体

更新:2007 年 11 月

分部方法签名声明体内不得包含任何代码。下面的示例演示分部方法签名及其实现。

' 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

更正此错误

  • 从分部方法声明中移除任何代码。

请参见

概念

分部方法