поменял возвращаемое значение для минуса
This commit is contained in:
parent
826cc3be3b
commit
21721ee795
@ -26,18 +26,15 @@ namespace ProjectAirplaneWithRadar.Generics
|
||||
if (obj == null || collect == null)
|
||||
{
|
||||
return -1;
|
||||
|
||||
}
|
||||
return collect._collection.Insert(obj);
|
||||
}
|
||||
public static T? operator -(AirplanesGenericCollection<T, U> collect, int pos)
|
||||
public static bool operator -(AirplanesGenericCollection<T, U> collect, int pos)
|
||||
{
|
||||
T? obj = collect._collection.Get(pos);
|
||||
if (obj != null)
|
||||
{
|
||||
collect._collection.Remove(pos);
|
||||
}
|
||||
return obj;
|
||||
T? obj = collect?._collection.Get(pos);
|
||||
if (obj != null && collect != null)
|
||||
return collect._collection.Remove(pos);
|
||||
return false;
|
||||
}
|
||||
public U? GetU(int pos)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user