Can you store multiple data types in System.Array?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
Can a static class have a constructor c#?
What if an error occurs in Catch block, how can you prevent it?
What?s the .NET datatype that allows the retrieval of data by a unique key?
What is a generic class?
What are the return types in c#?
What?s the top .NET class that everything is derived from?
Can arraylist hold primitive types?
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?
what is work of continue statement in C#?
Define boxing and unboxing in c#?
What is method overriding in c#
What is the use of New Keyword