{ public delegate void Mydel(int a); class Program { //this is ok public static event Mydel _MyEvt; static void Main(string[] args) { //Can i define event in this part give some error public static event Mydel _MyEvt; opreation g = new opreation(); _MyEvt += new Mydel(g.Hello); //_MyEvt += new Mydel(Greet.Hi); //_MyEvt += new Mydel(Greet.Bye); start(); Console.ReadKey(); } public static void start() { //i emplement uing abstract method but i want as normal method //can i pass parameter to event as normal int a; Console.WriteLine("Enter Parameter="); a = Convert.ToInt32(Console.ReadLine()); _MyEvt(a); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)