必须将方法“<methodname1>”声明为“Private”以便实现分部方法“<methodname2>”
更新:2007 年 11 月
必须将分部方法的实现声明为 Private。例如,下面的代码将导致此错误。
Partial Class Product
' Declaration of the partial method.
Partial Private Sub valueChanged()
End Sub
End Class
Partial Class Product
' Implementation of the partial method, with Private missing,
' causes this error.
'Sub valueChanged()
' MsgBox(Value was changed to " & Me.Quantity)
'End Sub
End Class
**错误 ID:**BC31441
更正此错误
在分部方法的实现中使用访问修饰符 Private,如下面的示例所示。
Private Sub valueChanged() MsgBox(Value was changed to " & Me.Quantity) End Sub