From 7a57f00e6e0925bea3ef4c1827dfb88d20948dac Mon Sep 17 00:00:00 2001 From: chtzsch ~ Date: Wed, 1 Nov 2023 12:22:40 +0300 Subject: [PATCH] lab_4 --- speed_Boat/speed_Boat/BoatsGenericStorage.cs | 3 --- speed_Boat/speed_Boat/GenericClass.cs | 25 -------------------- 2 files changed, 28 deletions(-) diff --git a/speed_Boat/speed_Boat/BoatsGenericStorage.cs b/speed_Boat/speed_Boat/BoatsGenericStorage.cs index 6c2b59f..c8ce9ad 100644 --- a/speed_Boat/speed_Boat/BoatsGenericStorage.cs +++ b/speed_Boat/speed_Boat/BoatsGenericStorage.cs @@ -85,8 +85,5 @@ namespace speed_Boat.Generics return null; } } - - - } } diff --git a/speed_Boat/speed_Boat/GenericClass.cs b/speed_Boat/speed_Boat/GenericClass.cs index 8ccb957..9eea6b2 100644 --- a/speed_Boat/speed_Boat/GenericClass.cs +++ b/speed_Boat/speed_Boat/GenericClass.cs @@ -36,8 +36,6 @@ namespace speed_Boat.Generics /// public bool Insert(T boat) { - //TODO vstavka v nachalo nabora!!! - if(_places.Count == 0) { _places.Add(boat); @@ -58,29 +56,6 @@ namespace speed_Boat.Generics } } return false; - - /*int currentI = -1; - for(int i = 0; i < _maxCount; i++)//_maxCount ili _places.Count? - { - if (_places[i] != null) - { - currentI = i; - break; - } - } - - if (currentI < 0) - { - return false; - } - - for(int i = currentI; i > 0; i--) - { - _places[i] = _places[i - 1]; - } - - _places[0] = boat; - return true;*/ } /// /// Добавление объекта в набор на конкретную позицию.