Can you store multiple data types in System.Array?

Answers were Sorted based on User's Feedback



Can you store multiple data types in System.Array?..

Answer / lalit

We can store multiple data types in an ArrayList but not in
a System.Array.

Is This Answer Correct ?    12 Yes 0 No

Can you store multiple data types in System.Array?..

Answer / guest

No

Is This Answer Correct ?    9 Yes 3 No

Can you store multiple data types in System.Array?..

Answer / raj

yes it is possible.
create an array of objects.

int i = 100;
string s = "hundred";

object [] obj = new object[2];
obj[0] = i;
obj[1] = s;

textbox1.Text = System.Convert.ToInt32(i) + "=" + s.ToString
();

Is This Answer Correct ?    10 Yes 6 No

Can you store multiple data types in System.Array?..

Answer / rakesh

Storing multiple data types in System.Array is not
possible,if u want to store multiple data type means use
ArrayList.It is auto expandable too

Is This Answer Correct ?    6 Yes 2 No

Can you store multiple data types in System.Array?..

Answer / ramu

If you want to store multiple data types use Hashtable.
In array you cannot store multiple data types.

Is This Answer Correct ?    3 Yes 1 No

Can you store multiple data types in System.Array?..

Answer / mukkamalla prasastha

No It is not at all possible

Is This Answer Correct ?    2 Yes 3 No

Can you store multiple data types in System.Array?..

Answer / sam

yes we can store multiple data type in system.Arry but the problem is when we retrieve the data then...

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More C Sharp Interview Questions

Can a static class have a constructor c#?

0 Answers  


What if an error occurs in Catch block, how can you prevent it?

2 Answers   IBM,


What?s the .NET datatype that allows the retrieval of data by a unique key?

2 Answers   SmartData,


What is a generic class?

0 Answers  


What are the return types in c#?

0 Answers  


What?s the top .NET class that everything is derived from?

7 Answers  


Can arraylist hold primitive types?

0 Answers  


Can we have private constructor in our class file. When we are trying to create instance for the class will it create or throw error regarding that?

5 Answers  


what is work of continue statement in C#?

3 Answers  


Define boxing and unboxing in c#?

0 Answers  


What is method overriding in c#

0 Answers  


What is the use of New Keyword

15 Answers  


Categories