Изменил(а) на 'ProjectPlane/ProjectPlane/SetPlanesGeneric.cs'
This commit is contained in:
parent
6977781923
commit
c920e6c1d5
@ -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>
|
||||
/// Удаление объекта из набора с конкретной позиции
|
||||
|
Loading…
Reference in New Issue
Block a user