Example #1
0
        static void Main(string[] args)
        {
            MyArrayList list = new MyArrayList();

            list.Added += MyHandler;
            list.Add(1);
            list.Add("1");
            list.Add("1234");
        }
Example #2
0
        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");
        }