diff --git a/Boats/Boats/SetBoatsGeneric.cs b/Boats/Boats/SetBoatsGeneric.cs index fdd126b..d56326b 100644 --- a/Boats/Boats/SetBoatsGeneric.cs +++ b/Boats/Boats/SetBoatsGeneric.cs @@ -69,7 +69,7 @@ namespace Boats public T Remove(int position) { // Проверка позиции - if (Count == 0 || position < 0 || position >= _maxCount) + if (position < 0 || position >= Count) return null; T boat = _places[position]; _places.RemoveAt(position);