Learn How to Create/USE events from other DLL into our own DLL.
I was creating my own DLL uisng soome other dlls.so i was in problem while using the Events from Main DLL into my Own DLL.
So i find Out below solution to get Events from Main DLL into our OWN DLL.
public class my_DLL
// This is Main Dll's Object
Main_DLL_Class class1 = new Main_DLL_Class();
// Delegate for my new event
public delegate void my_event(string user);
// Handler for my new event
public virtual event my_event event1;
// function to call my new event handler
public void on_my_event_call()
// assign the function to Main DLL event.
class1 .Main_event += new Main_event(on_main_event);
//in this function we get values in parameter
void on_main_event(string user)
//values are passed to my new event.
Now use the new DLL in some other class.
See the below code.
// This is class in which we use our New DLL and its event.
//creates the object of new DLL class
my_DLL my1 = new my_DLL();
//Assign Function to New event handler
my1 .event1 += new my_DLL my_event(my1 _event1);
void my1 _event1(string userid,)
Wow, your post makes mine look feeble. More power to you!