static void Main(string[] args) { //Employee e1 = new Manager("Ujjwal", 23); //e1.Display(); //Employee e2 = new Manager("Swati", 22, 3); //e2.Display(); //ArrayList al = new ArrayList(); //al.AddRange(new string[] { "first", "second", "third" }); //Console.WriteLine("Array list has {0} items",al.Count); //Console.WriteLine("The elements are:"); //foreach (string s in al) //{ // Console.WriteLine(s); //} //al.Add("fourth"); //Console.WriteLine("Array list has {0} items", al.Count); //Console.WriteLine("The elements are:"); //foreach (string s in al) //{ // Console.WriteLine(s); //} //Family myFamily = new Family(); //foreach (Manager m in myFamily) //{ // Console.WriteLine(m.Name); //} //Point c1 = new Point() //{ // X = 10, // Y = 20 //}; //Console.WriteLine(c1.ToString()); //Point c2 = (Point)c1.Clone(); //Console.WriteLine(c2.ToString()); //c2.X = 30; //Console.WriteLine(c2.ToString()); //Console.WriteLine(c1.ToString()); //int myint = 7; //object myboxedObject = myint; //int unboxed = (int)myboxedObject; //Console.WriteLine(myint); //Console.WriteLine(myboxedObject); //Console.WriteLine(unboxed); //ArrayList al = new ArrayList(); //al.Add(10); //al.Add(20); //al.Add(30); //int i = (int)al[0]; //int[] myArray = new int[5]; //myArray[0] = 50; //myArray[1] = 40; //myArray[2] = 30; //myArray[3] = 20; //myArray[4] = 10; //Array.Sort<int>(myArray); //foreach (int i in myArray) //{ // Console.WriteLine(i); //} Family f1 = new Family(); //IEnumerator e1 = f1.GetEnumerator(); //foreach (Manager m in f1) //{ // if (e1.MoveNext()) // Console.WriteLine(e1.Current.ToString()); //} IEnumerator e2 = f1.GetEnumerator(); while (e2.MoveNext()) { Console.WriteLine(e2.Current); } Console.ReadKey(); }