// Some members ... void MethodOfIEnumerable2();
// Some members ... void MethodOfICollection2();
// Some members ... void MethodOfIIList2();
public void MethodOfIEnumerable2(){ Console.WriteLine("IEnumerable2 In ArrayList2"); } public void MethodOfICollection2(){ Console.WriteLine("ICollection2 In ArrayList2"); } public void MethodOfIIList2() { Console.WriteLine("IList2 In ArrayList2"); }
public void MethodOfIEnumerable2(){ Console.WriteLine("IEnumerable2 In ArrayList3"); } public void MethodOfICollection2() { Console.WriteLine("ICollection2 In ArrayList3"); } public void MethodOfIIList2(){ Console.WriteLine("IList2 In ArrayList3"); }
static void Main(string[] args) {
ArrayList2 al2 = new ArrayList2(); ArrayList3 al3 = new ArrayList3(); al2.MethodOfIEnumerable2(); al2.MethodOfICollection2(); al2.MethodOfIIList2(); Console.WriteLine(); al3.MethodOfIEnumerable2(); al3.MethodOfICollection2(); al3.MethodOfIIList2(); Console.ReadKey(true);
ArrayList2 al2 = new ArrayList2();
ArrayList3 al3 = new ArrayList3();
al2.MethodOfIEnumerable2();
al2.MethodOfICollection2();
al2.MethodOfIIList2();
Console.WriteLine();
al3.MethodOfIEnumerable2();
al3.MethodOfICollection2();
al3.MethodOfIIList2();
Console.ReadKey(true);
}