public void ClearLibrary() { if (counter == 0) { ExccessBookkeepingEmpty err = new ExccessBookkeepingEmpty("ERROR!!!\n Bookkeeping is empty"); throw err; } else { counter = 0; data.Clear(); Console.WriteLine("Бухгалтерия очищена!"); } }
public void Output() { if (counter == 0) { ExccessBookkeepingEmpty err = new ExccessBookkeepingEmpty("ERROR!!!\n Bookkeeping is empty"); throw err; } else { foreach (object i in data) { Console.WriteLine($"Объект {i}"); } } }