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

What is sorted list in c#?

0 Answers  


Are private members inherited in c#?

0 Answers  


What is a Assembly?

0 Answers   UGC Corporation,


What is a sealed class?

0 Answers  


What is JIT (just in time)? how it works?

0 Answers  






What are the extension methods in c#?

0 Answers  


Are constructors inherited c#?

0 Answers  


Explain publishers and subscribers in events.

0 Answers  


can you create a function in c# which can accept varying number of arguments

0 Answers   Cognizant,


What are Generics?

5 Answers   TCS,


Does c# support properties of array types?

0 Answers  


You are creating a custom usercontrol, some of the newly created properties are shown in the properties window. How you can hide a new property named theme from the properties window?

0 Answers  


Categories