ch3p-Food (base class)
AppParty Party | Cake |
Food.cs
namespace party.foods
{
abstract class Food
{
string name;
public string Id
{
get
{
return name;
}
set
{
name = value;
}
}
public Food(string s)
{
Id = s; // calling the set accessor of the Id property
}
override public string ToString()
{
return $"{Id}";
}
}
}
AppParty Party | BACK_TO_TOP | Cake |
Comments
Post a Comment