generic and non-generic collection [Resolved]

Posted by Santoshkumar under C# on 10/29/2010 | Points: 10 | Views : 30118 | Status : [Member] | Replies : 2
what is the difference between generic and non-generic collection?

thanq




Responses

Posted by: SheoNarayan on: 10/30/2010 [Administrator] HonoraryPlatinum | Points: 50

Up
0
Down

Resolved
Generic collection allows us to put any kind of object inside it but Non-generic collection let us put everything in the form of object system.Object.

// Generic collection

List<T> list = new List<T>();
list.Add("Any object");

// Non generic collection
List list = new List();
list.Add("Any object");



Hope this help.


Regards,
Sheo Narayan
http://www.dotnetfunda.com

Santoshkumar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: T.saravanan on: 10/30/2010 [Member] [MVP] Silver | Points: 50

Up
0
Down

Resolved
Hi Santhosh,

Refer those links...

http://www.vcskicks.com/array-to-string.php

http://msdn.microsoft.com/en-us/library/kwtft8ak.aspx

Cheers :)

Thanks,
T.Saravanan

Santoshkumar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response