|
|
@ -29,7 +29,7 @@ Console.WriteLine("test overload of [] operator:");
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
rc[2].DisplayId();
|
|
|
|
rc[2].DisplayId();
|
|
|
|
rc.GetById(14).DisplayId();
|
|
|
|
rc.GetById(110).DisplayId();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (ArgumentNullException)
|
|
|
|
catch (ArgumentNullException)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -51,5 +51,5 @@ RecipeCollection rc2 = new RecipeCollection(
|
|
|
|
Console.WriteLine("test of Enumerable property:");
|
|
|
|
Console.WriteLine("test of Enumerable property:");
|
|
|
|
foreach (Recipe r in rc2)
|
|
|
|
foreach (Recipe r in rc2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
r.DisplayId(); Console.Write(" - ");
|
|
|
|
r.DisplayId();
|
|
|
|
}
|
|
|
|
}
|
|
|
|