What are events and methods and their significance in Object Oriented Concepts in C# .Net

Last Reply on Jun 18, 2013 03:08 AM By RkHirpara

Posted on Jun 18, 2013 12:01 AM

i am confusing in events and method

what are this ,explain them how related with respect to object oriented concept

Posted on Jun 18, 2013 03:08 AM

Hi Siddanguod,

In technical terms Events too are methods. But they are called as some event occured, let say dropDown index changed is an event, when you bind this event to an event handler OnSelectedIndexChanged so whenever an action to change index of that dropdown is occered that event is fired automatically(Practically its called internally you need not to code any thing in OOP to call that event). There are events Like Page_Load, PreInit and so forth, these are too fired automatically when in asp.Net page life cycle when page is being loded the Page_Load event is fired. These events hase predifind parameters, you cannot always change input parameters.

While In case of Methods you need to code as per your requiremet, logic, also you need to call the methods, It would not called automatically as Events.

For more information refer

1) Event

Thanks and Regards,