} //הגדרנו מערך #region constractor public ShoppingList(ShoppingList s) { ListName = s.ListName; DateList = s.DateList; breedArr = new Breed(breedArr); }
public ShoppingList(int numOfBreed, int numOfMilk) { breedArr = new Breed[numOfBreed]; for (int i = 0; i < numOfBreed; i++) { breedArr[i] = new Breed(); } milkArr = new Milk[numOfMilk]; for (int i = 0; i < numOfMilk; i++) { milkArr[i] = new Milk(); } }