From 6c1ba48d5c6e9c84187bd3a0ec619bd0fb10a315 Mon Sep 17 00:00:00 2001 From: prodigygirl Date: Mon, 10 Oct 2022 14:59:25 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ArmoredCar/ArmoredCar/SetArmoredCarsGeneric.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArmoredCar/ArmoredCar/SetArmoredCarsGeneric.cs b/ArmoredCar/ArmoredCar/SetArmoredCarsGeneric.cs index a4057ec..1396bd9 100644 --- a/ArmoredCar/ArmoredCar/SetArmoredCarsGeneric.cs +++ b/ArmoredCar/ArmoredCar/SetArmoredCarsGeneric.cs @@ -60,7 +60,7 @@ namespace ArmoredCar /// 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]; }