How to write my own EventHandle ?
-
Many Controls/Class have their own EventHandle , Such as Button.Click ,... i want to write my own EventHandle for my own class. but i dont understand it too much. The samples on MSDN are a bit difficult for me. are there some article concerning on this issue ?
-
Many Controls/Class have their own EventHandle , Such as Button.Click ,... i want to write my own EventHandle for my own class. but i dont understand it too much. The samples on MSDN are a bit difficult for me. are there some article concerning on this issue ?
It's is pretty easy to go for Custom Events( Own Event) in .NET. You need to cover few other techinics,if you want to go for this sort Custom Events and Event Handlers. You need to declare a deletegate for the event. Then need to encapsulate your code(Own Event handler code) into that delegate. Once you finish this, then you can declare an event of your delegate type. Then try to use your event where ever you want. I seen lot of same question in CP discussion. And i know this much information is not sufficient for you people. Anyhow wait, in a couple of days i will write a nice article on Custom Events and Handling . For the time being you can refer this articles. Custom Events Sreejith Nair [ My Articles ]
-
Many Controls/Class have their own EventHandle , Such as Button.Click ,... i want to write my own EventHandle for my own class. but i dont understand it too much. The samples on MSDN are a bit difficult for me. are there some article concerning on this issue ?