Which collection will you use to store different types of
objects collection like... int, employee, student, object
etc.

Answer Posted / rasik bihari

I would use array list. Every element in an array list is
of object type. Since object class is base class of all the
types in .net or any custom class so it will be possible to
store different types of objects like int,employee(Custom
class), student(custom class), object (base class itself)
into an Array list collection.

Is This Answer Correct ?    15 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by saying a "class is a reference type"?

511


What is the base class from which all value types are derived?

501


What is the difference between throw and throw ex?

467


what is difference between is and as operators in c#?

537


What is difference between assembly and namespace?

473






Difference between call by value and call by reference in C#?

523


Explain the difference between “as” and “is” operators used in c#?

502


Describe the ways of cleaning up objects in c#.

522


What is stringbuilder c#?

515


Is int a struct in c#?

490


Is and as in c#?

512


If the original method is not static you can declare an override method to be static or not?

505


what class is underneath the sortedlist class?

553


Different between method overriding and method overloading?

488


what is the difference between interface and multiple interface?

541