Adding your own methods to event handlers on controls is super easy.
Example 1
txtDataReceived.Click += delegate { foo(localVariable1,localVariable2); };
Example 2
imgbtn.Click += delegate { lbl.Visible = false; DoPostBack(); };
2 comments:
Super simple. thank you
Adding custom methods to Control functions in C# WinForms can streamline your application development. Tools like ModEngine2 make integration and functionality enhancements much simpler.
Post a Comment