Kshitiz Bhargav
Can you store different types in an Array in C# ?
By Kshitiz Bhargav in .NET on Aug 22 2016
  • Mukesh Kumar
    Aug, 2017 28

    ya by the use of object array like object[] a=new object[10];

    • 1
  • Kshitiz Bhargav
    Aug, 2016 22

    The answer is yes! if we create object array. all types in .net inherits directly or indirectly from system.object. we can add any types of object array including complex types like employee class ,student class. Second option is to use ArrayList class which is present in system.collection .namespace.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS