Лёвушкина Анна, ПИбд-21, лаб8 простая #15

Closed
AnnaLioness wants to merge 2 commits from лаб8 into лаб7
2 changed files with 0 additions and 24 deletions
Showing only changes of commit 6e8888240b - Show all commits

View File

@ -34,21 +34,6 @@ namespace Lab1ContainersShip
/// </summary>
/// <param name="car">Добавляемый автомобиль</param>
/// <returns></returns>
/*public int Insert(T ship)
{
// TODO вставка в начало набора
if(_places.Count >= _maxCount)
{
throw new StorageOverflowException();
return -1;
}
else
{
_places.Insert(0, ship);
return 0;
}
}*/
public bool Insert(T ship, IEqualityComparer<T?>? equal = null)
{
return Insert(ship, 0, equal);
@ -79,14 +64,6 @@ namespace Lab1ContainersShip
{
throw new ShipNotFoundException(position);
}
/*if(position == _places.Count)
{
_places.Add(ship);
}
else
{
_places.Insert(position, ship);
}*/
if (equal != null && _places.Contains(ship, equal))
{
throw new ApplicationException("уже есть");

View File

@ -60,7 +60,6 @@ namespace Lab1ContainersShip
{
return false;
}
//return collect?._collection.Insert(obj) ?? -1;
return (bool)collect?._collection.Insert(obj, new DrawiningShipEqutables());
}