G
Guest
Can someone explain a few things about collections to me.
In C# 2 generics, you can create a collection class by inheriting from
System.Collections.ObjectModel.Collection. Using this you can iterate through
the collection and use "foreach" on the collection.
public class Cars : System.Collections.ObjectModel.Collection<Car> { }
So, could someone explain to me why you would want to create a GENERIC
custom collection class.
See http://www.codeproject.com/dotnet/GenericCustomClass.asp -- "Writing
Custom Collection Classes" section
I haven't really used collection classes or had to write one for .Net 1.1,
so i am a little perplexed.
Many thanks, CR
In C# 2 generics, you can create a collection class by inheriting from
System.Collections.ObjectModel.Collection. Using this you can iterate through
the collection and use "foreach" on the collection.
public class Cars : System.Collections.ObjectModel.Collection<Car> { }
So, could someone explain to me why you would want to create a GENERIC
custom collection class.
See http://www.codeproject.com/dotnet/GenericCustomClass.asp -- "Writing
Custom Collection Classes" section
I haven't really used collection classes or had to write one for .Net 1.1,
so i am a little perplexed.
Many thanks, CR