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
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 |
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 |
Describe an abstract class?
what are ways to debug the code step by step except using breakpoints?
What Happens In Memory When You Box And Unbox A Value-type?
Is typeof c#?
In .NET which is the smallest unit of execution?
Can hashtable have duplicate keys?
What is verbatim literal in c#?
What does addressof operator do in background ?
Is it possible to implement an interface to a structure? Is it possible to extend a struct? Is it possible to inherit a class to struct?
9 Answers IBM, Logica CMG, TCS,
When should we use delegates in c#?
What are Memory foot print of an exe?
What does int32 mean in c#?