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; }