none
Generic Collections and Non-Generic

    Question

  • hi Any one help me

    What is difference b/w Generic Collections and non-Generic Collections and also Specilized Collections

    Monday, June 27, 2011 6:01 AM

Answers

  • Major difference using the generics is the casting and uncasting of object types.

    Before generics was introduced any data stored inside collection (e.g hastable) was in object type, hence if you required to access data from this object you would first uncast the object to known type and then access it. Casting and Uncasting of the object creates overheads and is time and cost consuming process.

    Specialized Generic types have some add on features such as in dictionary you can not only access the value with key but also with array index.

     


    Regards, Ashwin. Shetty
    Monday, June 27, 2011 10:13 AM