类型“<type name>”没有名为“<event name>”的事件
更新:2007 年 11 月
此错误信息中指定的类型没有那个名称的事件。下面的示例试图调用一个不受支持的事件。
Private Sub Button1_Chew(ByVal sender as Object, ByVal e as System.EventArgs) Handles Button1.Chew
End Sub
更正此错误
使用该类型所支持的事件。
说明: C# 用户使用以下代码时不会发生错误:
private void button1_Chew(object sender, System.EventArgs e) { }
但是,添加类似以下代码的代码行以连接事件处理程序将引发错误“System.Windows.Forms.Button 并不包含对 Chew 的定义”:
button1.Chew += new System.EventHandler(this.button1_Chew);