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

Answers were Sorted based on User's Feedback



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

Answer / muralik.it

its better to use generic class ie list

Is This Answer Correct ?    6 Yes 1 No

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

Answer / 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

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

Answer / guest

Tuple

Is This Answer Correct ?    1 Yes 0 No

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

Answer / guest

structure

Is This Answer Correct ?    5 Yes 5 No

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

Answer / sumithra

We can use structure. Structure holds different types of data where as array is homogenous.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

How do you implement multiple inheritance in .NET?

5 Answers   Infosys, Microsoft,


What is difference between ienumerable and list in c#?

0 Answers  


How is lazy loading achieved?

0 Answers  


if a method is marked as protected internal who can access it?

0 Answers   Siebel Systems,


What is file extension of webservices?

0 Answers  


Which function is the entry point for a DLL in MS Windows 3.1?

0 Answers   3i Infotech,


What is array and arraylist?

0 Answers  


Why do we need interfaces in c#?

0 Answers  


Why do we need constructor?

0 Answers  


What is windows application in c#?

0 Answers  


What are PE(Portable Executable)?

0 Answers   MCN Solutions,


What are the types of methods in c#?

0 Answers  


Categories