Borschevskaya A.A. Lab Work 4 #4

Merged
eegov merged 7 commits from lab4 into lab3 2022-10-28 09:18:07 +04:00
Showing only changes of commit 6c1ba48d5c - Show all commits

View File

@ -60,7 +60,7 @@ namespace ArmoredCar
/// <returns></returns>
public T Remove(int position)
{
if (position < 0 || position >= _maxCount)
if (position < 0 || position >= Count)
return null;
T armoredCar = _places[position];
_places.RemoveAt(position);
@ -77,7 +77,7 @@ namespace ArmoredCar
{
get
{
if (position < 0 || position >= _maxCount)
if (position < 0 || position >= Count)
return null;
return _places[position];
}