请问C#有一个把手的关键字?有一个、把手、关键字

由网友(放下尊严放下个性放下固执)分享简介:Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClickEnd Sub在VB.net,我们有Handl...
Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick


End Sub

在VB.net,我们有Handles关键字,我想知道如果C#有什么可比性。还是你必须手动关联的所有方法给每个控件的事件(在ASP.NET尤其是)?

In VB.net, we have the Handles keyword, I'm wondering if C# has anything comparable. Or do you have to manually wire all the methods to each control's event (in ASP.NET especially)?

推荐答案

都能跟得上。你必须要连接这样的事件

Nope. You will have to wire up the event like this

Menu1.MenuItemClick += Menu1_MenuItemClick;
阅读全文

相关推荐

最新文章