Loading ...

difference between collection and generic?

Who is online?  0 guests and 0 members
home  »  forums   »  asp.net topics   »  getting started / general asp.net   » difference between collection and generic?

difference between collection and generic?

Posts under the topic: difference between collection and generic?

Posted: 10/15/2010

Contributor 2237  points  Contributor
  • Joined on: 9/24/2009
  • Posts: 172

Hello Experts,

Non - Generic collection class - which collection can hold the different type of data.

Generic collection class - which collection can hold the same type of data.

Now can anyone tell me what is the difference between Collection and Generic?

 

Thanks in advance.


Posted: 10/15/2010

Professional 8338  points  Professional
  • Joined on: 4/15/2009
  • Posts: 424
  Answered

Collections are enumerable data structures that can be assessed using indexes or keys.Using generic collection classes provides increased type-safety and in some cases can provide better performance, especially when storing value types. For more information see:http://blogs.msdn.com/b/jeremykuhne/archive/2005/07/22/generic-collections-i.aspx


Page 1 of 1 (2 items)