готово
This commit is contained in:
parent
2f7700a12e
commit
4b2b4e4d2c
@ -61,6 +61,12 @@ namespace Airbus
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((plane is EntityAirbus) && !(otherPlanePlane is EntityAirbus)
|
||||||
|
|| !(plane is EntityAirbus) && (otherPlanePlane is EntityAirbus))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (plane is EntityAirbus airbus && otherPlanePlane is EntityAirbus otherAirbus)
|
if (plane is EntityAirbus airbus && otherPlanePlane is EntityAirbus otherAirbus)
|
||||||
{
|
{
|
||||||
if (airbus.DopColor != otherAirbus.DopColor)
|
if (airbus.DopColor != otherAirbus.DopColor)
|
||||||
|
@ -35,8 +35,7 @@ namespace Airbus
|
|||||||
public int Insert(T plane)
|
public int Insert(T plane)
|
||||||
{
|
{
|
||||||
if (_places.Count == _maxCount) throw new StorageOverflowException(_maxCount);
|
if (_places.Count == _maxCount) throw new StorageOverflowException(_maxCount);
|
||||||
_places.Insert(0, plane);
|
return Insert(plane, 0);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Добавление объекта в набор на конкретную позицию
|
/// Добавление объекта в набор на конкретную позицию
|
||||||
|
Loading…
Reference in New Issue
Block a user