difference betwwen cgeneric class and collection

The generic classdoes not have virtual methods for Add, Remove etc, as it was designed to be fast, not extensible.
for eg iList,iDictionary.Here it is treat like a contact because it is an interface where you have to implement other part.

 But By exposing your collection class for e.g IList or some-such, you can still use the List as the actual backing-store.Here you can add remove,sort.

For eg

IDictionary
<string, object> d = new Dictionary<string, object>();
Here IDictionary is the generic class and the Dictionary is the colelction class which implement the contract generic class IDictionary
Ebook Download
View all
Learn
View all