PI-12_Zaytsev_A.V_LabWork03_Base #6

Closed
tyxzo wants to merge 5 commits from lab3 into lab2
Showing only changes of commit 59d11e7b84 - Show all commits

View File

@ -41,7 +41,7 @@ public class MassiveGenericObjects<T> : ICollectionGenericObjects<T>
public T? Get(int position)
{
if (position < 0 || position > Count)
if (position < 0 || position >= Count)
{
return null;
}
@ -57,7 +57,7 @@ public class MassiveGenericObjects<T> : ICollectionGenericObjects<T>
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<T> : ICollectionGenericObjects<T>
public T? Remove(int position)
{
if (position < 0 || position > Count)
if (position < 0 || position >= Count)
{
return null;
}