public event t tEvt; //declares an event for the delegate public void mm() { //function that will raise the callback MyArgs r = new MyArgs(); tEvt(this, r); //calling the client code }
//this code will be called from the server public void oo_tt(object sender, MyArgs e) { Console.WriteLine("yes"); Console.ReadLine(); }