我想做这样的事情:
Button button = new Button("Button");
button.addClickListener(new ClickListener(){
//Implement required methods here..
});
我怎样才能在C#中做到这一点?
答案 0 :(得分:1)
附加事件处理程序:
button.Click += myClickEvent;
...
protected void myClickEvent(Object sender, EventArgs e)
{
// do your thing
}