public ShoppingBasketList()
{
Items = new List<ShoppingBasketItem>();
}
Is a constructor declaration (because it does not specify a return type). A constructor should always have the same name as the class it belongs to. Your constructor is called ShoppingBasketList
while your class is called ShoppingBasket
. You should rename your class to ShoppingBasketList
or rename your constructor to ShoppingBasket
.
eg.
public ShoppingBasket()
{
Items = new List<ShoppingBasketItem>();
}
You can read a bit more about constructors here.