What is the advantage of using constraints on C# Generics
- by user313197
Can someone tell me what the difference is between the following
public class CarCollection:List where T:Car
{
}
and
public class CarCollection:List
{
}
To me they seem to do the same thing, create type-safe collection of "Car" objects.