PI-12_Zaytsev_A.V_LabWork04_Base #7

Closed
tyxzo wants to merge 3 commits from lab4 into lab3
2 changed files with 5 additions and 2 deletions
Showing only changes of commit a323b124aa - Show all commits

View File

@ -42,7 +42,7 @@ public class ListGenericObjects<T> : ICollectionGenericObjects<T>
public int Insert(T obj, int position)
{
if (Count >= _maxCount || position < 0 || position > _maxCount)
if (Count >= _maxCount || position < 0 || position >= _maxCount)
{
return -1;
}

View File

@ -52,7 +52,10 @@ public class StorageCollection<T>
public void DelCollection(string name)
{
_storages.Remove(name);
if (_storages.ContainsKey(name))
{
_storages.Remove(name);
}
}
public ICollectionGenericObjects<T>? this[string name]