Button myButton = new Button(); //... myButton.Click += (sender, eventArgs) => { //some call -- whatever you need on click }; //this can work for v.2.0 as well, a bit more wordy: myButton.Click += delegate(object sender, System.EventArgs eventArgs) { //some other call };
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)