コード例 #1
0
ファイル: Conteiner.cs プロジェクト: Sheleh01/LAB7
 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!");
     }
 }
コード例 #2
0
ファイル: Conteiner.cs プロジェクト: Sheleh01/LAB7
 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}");
         }
     }
 }