изменения

This commit is contained in:
Salikh 2023-11-29 19:49:59 +04:00
parent 05134ead4f
commit 6a441f2fe7

View File

@ -69,10 +69,8 @@ namespace ProjectBomber.Generics
public bool Remove(int position) public bool Remove(int position)
{ {
/// Проверка позиции /// Проверка позиции
if (position < 0 || position >= _places.Count) if ((position < 0) || (position > _maxCount)) return false;
return false; _places.RemoveAt(position);
/// Удаление объекта из массива, присвоив элементу массива значение null
_places[position] = null;
return true; return true;
} }
/// <summary> /// <summary>