From 8070b792bf68de7b95693eea33965250433767bc Mon Sep 17 00:00:00 2001 From: MorozovDanil Date: Mon, 15 Apr 2024 01:56:16 +0400 Subject: [PATCH] =?UTF-8?q?=D1=82=D0=B5=D1=81=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CollectionGenericObjects/AbstractCompany.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ProjectContainerShip/ProjectContainerShip/CollectionGenericObjects/AbstractCompany.cs b/ProjectContainerShip/ProjectContainerShip/CollectionGenericObjects/AbstractCompany.cs index 73ad088..4a20e8c 100644 --- a/ProjectContainerShip/ProjectContainerShip/CollectionGenericObjects/AbstractCompany.cs +++ b/ProjectContainerShip/ProjectContainerShip/CollectionGenericObjects/AbstractCompany.cs @@ -56,9 +56,9 @@ public abstract class AbstractCompany /// Компания /// Добавляемый объект /// - 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; } /// @@ -67,9 +67,9 @@ public abstract class AbstractCompany /// Компания /// Номер удаляемого объекта /// - 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; } ///