fixed Remove #2
This commit is contained in:
parent
42c6b8fa7b
commit
6571ef791a
@ -69,7 +69,7 @@ namespace Boats
|
|||||||
public T Remove(int position)
|
public T Remove(int position)
|
||||||
{
|
{
|
||||||
// Проверка позиции
|
// Проверка позиции
|
||||||
if (Count == 0 || position < 0 || position >= _maxCount)
|
if (position < 0 || position >= Count)
|
||||||
return null;
|
return null;
|
||||||
T boat = _places[position];
|
T boat = _places[position];
|
||||||
_places.RemoveAt(position);
|
_places.RemoveAt(position);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user