Dolgov D.A. Lab Work 7 #7

Closed
devil_1nc wants to merge 5 commits from LabWork07 into LabWork06
Showing only changes of commit c920e6c1d5 - Show all commits

View File

@ -43,9 +43,12 @@ namespace ProjectPlane
/// <returns></returns>
public int Insert(T plane, int position)
{
if (position < 0 || position >= _maxCount) throw new StorageOverflowException(_maxCount);
if (Count == _maxCount) throw new StorageOverflowException(_maxCount);
if (position < 0 || position >= _maxCount) return -1;
_places.Insert(position, plane);
return position;
}
/// <summary>
/// Удаление объекта из набора с конкретной позиции