тест
This commit is contained in:
parent
ca753501b0
commit
8070b792bf
@ -56,9 +56,9 @@ public abstract class AbstractCompany
|
|||||||
/// <param name="company">Компания</param>
|
/// <param name="company">Компания</param>
|
||||||
/// <param name="ship">Добавляемый объект</param>
|
/// <param name="ship">Добавляемый объект</param>
|
||||||
/// <returns></returns>
|
/// <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>
|
/// <summary>
|
||||||
@ -67,9 +67,9 @@ public abstract class AbstractCompany
|
|||||||
/// <param name="company">Компания</param>
|
/// <param name="company">Компания</param>
|
||||||
/// <param name="position">Номер удаляемого объекта</param>
|
/// <param name="position">Номер удаляемого объекта</param>
|
||||||
/// <returns></returns>
|
/// <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>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user