CAN WE STORE MULTIPLE DATA TYPES IN SYSTEM.ARRAY?

Uttam Misra

Total Post:54

Points:270
Posted by  Uttam Misra
 5157  View(s)
Ratings:
Rate this:
  1. Amit Singh

    Post:565

    Points:2825
    Can we store multiple data types in System.Array?

    No, we can not store multiple data types in System.Array

    Reason:
    System.Array store only similar type of data for example integer type defined array store only int type data.
    it is type safe.

    we use collection object like ArrayList etc for storing multiple type of data

  1. Rajesh Goswami

    Post:85

    Points:425
    Can we store multiple data types in System.Array?

    Yes you can, if you have an object array. since System.Object is the base class of all other types, an item in an array of Objects can have a reference to any other type of object.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!