//Indicate whether an animal is a herbivore or carnivore private void CheckBoxCarnivore_CheckedChanged(object sender, EventArgs e) { if (checkBoxCarnivore.Checked) { send = Type.typeAnimal.Carnivore; } else { send = Type.typeAnimal.Herbivore; } }
//constructor public Animal(string name, Size weight, Type.typeAnimal typeAnimal) { this.Name = name; this.Weight = weight; this.typeAnimal = typeAnimal; }