From 59d11e7b84a1127b95b1252772a6c1b029c70288 Mon Sep 17 00:00:00 2001 From: tyxz0 Date: Thu, 25 Apr 2024 21:06:06 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BE=D0=B3=D1=80=D0=B0=D0=BD=D0=B8=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9=20=D0=BC=D0=B0=D1=81=D1=81=D0=B8=D0=B2=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CollectionGenericObjects/MassiveGenericObjects.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DoubleDeckerBus/DoubleDeckerBus/CollectionGenericObjects/MassiveGenericObjects.cs b/DoubleDeckerBus/DoubleDeckerBus/CollectionGenericObjects/MassiveGenericObjects.cs index 614f73c..887317e 100644 --- a/DoubleDeckerBus/DoubleDeckerBus/CollectionGenericObjects/MassiveGenericObjects.cs +++ b/DoubleDeckerBus/DoubleDeckerBus/CollectionGenericObjects/MassiveGenericObjects.cs @@ -41,7 +41,7 @@ public class MassiveGenericObjects : ICollectionGenericObjects public T? Get(int position) { - if (position < 0 || position > Count) + if (position < 0 || position >= Count) { return null; } @@ -57,7 +57,7 @@ public class MassiveGenericObjects : ICollectionGenericObjects public int Insert(T obj, int position) { - if (position < 0 || position > Count) + if (position < 0 || position >= Count) { return -1; } @@ -89,7 +89,7 @@ public class MassiveGenericObjects : ICollectionGenericObjects public T? Remove(int position) { - if (position < 0 || position > Count) + if (position < 0 || position >= Count) { return null; }