I\'m new to interfaces and abstract classes. I want to create a couple of interfaces to define core methods and variables for the objects for a shopping cart system. Then I want
You need to user generics in C# 2 to achieve that:
public interface ICart where T : ICartItem
{
// ...
List CartItems { get; set; }
}
public abstract class Cart : ICart
{
// ...
public List CartItems { get; set; }
}