public void ClearLaboratory() { if (counter == 0) { ExccessLaboratoryEmpty err = new ExccessLaboratoryEmpty("ERROR!!!\n Laboratory is empty"); throw err; } else { counter = 0; data.Clear(); Console.WriteLine("Empty!"); } }
public void Output() { if (counter == 0) { ExccessLaboratoryEmpty err = new ExccessLaboratoryEmpty("ERROR!!!\n Laboratory is empty"); throw err; } else { foreach (object i in data) { Console.WriteLine($"Object {i}"); } } }