This commit is contained in:
MorozovDanil 2024-04-15 01:56:16 +04:00
parent ca753501b0
commit 8070b792bf

View File

@ -56,9 +56,9 @@ public abstract class AbstractCompany
/// <param name="company">Компания</param>
/// <param name="ship">Добавляемый объект</param>
/// <returns></returns>
public static bool operator +(AbstractCompany company, DrawningShip boat)
public static int operator +(AbstractCompany company, DrawningShip boat)
{
return company._collection?.Insert(boat) ?? false;
return company._collection?.Insert(boat) ?? -1;
}
/// <summary>
@ -67,9 +67,9 @@ public abstract class AbstractCompany
/// <param name="company">Компания</param>
/// <param name="position">Номер удаляемого объекта</param>
/// <returns></returns>
public static bool operator -(AbstractCompany company, int position)
public static DrawningShip operator -(AbstractCompany company, int position)
{
return company._collection?.Remove(position) ?? false;
return company._collection?.Remove(position) ?? null;
}
/// <summary>