static void Main(string[] args) { MyArrayList list = new MyArrayList(); list.Added += MyHandler; list.Add(1); list.Add("1"); list.Add("1234"); }
static void Main(string[] args) { MyArrayList list = new MyArrayList(); list.Added += (object sender, MyEventArgs e) => Console.WriteLine($"object added by {sender.ToString()} and count :{e.Count}"); list.Add(1); list.Add("1"); list.Add("1234"); }