private void OnAdded() { if (Added != null) { MyEventArgs e = new MyEventArgs(); e.Count = cnt++; Added(this, e); } }
//Event Handler static void list_Added(object sender, MyEventArgs e) { Console.WriteLine("Item Added to List and Event Count ="+ e.Count ); }