Hieverybody,

Likethe_nell_87, I think the answer in 10th question is not ok (Can you storemultiple data types in System.Array?).
If you havea this hierarchy: class Person {}; class Male : Person {}; class Female : Person {}; each Maleor Female object is also a Person object.
With an ArrayListobject, I can insert multiple types of the same hierarchy, and then convert theArrayList to an Array using the base type of Person. The following code works fine:
Code:
class Person { }
    class Male : Person { }
    class Female : Person { }
 
    class Program
    {
        static void Main(string[] args)
        {
            ArrayList al = newArrayList();
           al.Add(new Female());
           al.Add(new Male());
            Person auxp = new Person();
           al.Add(auxp);
            Array a = al.ToArray(auxp.GetType());
            foreach (Person p in a)
            {
                Console.WriteLine(p.GetType().ToString());
}
        }
    }
So, in myopinion the answer is yes.

Last edited by shabbir; 24Jan2013 at 09:22.. Reason: Code blocks