Can you store multiple data types in System.Array?

Answer Posted / shamjeet

yes,ofcourse
System.Array is of Object Type
eg:
int a =10;
float b=2.03;
string c = "yes"
object[] val = new object[3];
val[0] = a;
val[1] = b;
val[2] = c;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain nullable types in c#?

704


What is monitor in C#?

755


What is anonymous methods in c#?

727


Is c# or c++ better for games?

630


Why we use get and set property in c#?

688


What is window application in c#?

691


What is difference between ienumerable and iqueryable in c#?

683


Explain about Error handling and how this is done

712


What are the main reasons to use c# language?

678


Which is faster hashtable or dictionary?

673


What exactly happens when we debug and build the program?

2170


What is expression c#?

679


Can I use ReaderWriterLock instead of Monitor.Enter/Exit for Threading?

708


What is helper method in c#?

660


What do you mean by abstract class in c#?

722