еще правки лабы 7

This commit is contained in:
Полина Чубыкина 2023-12-23 16:32:11 +04:00
parent 504ea1e2a3
commit 470c6c0f03
2 changed files with 1 additions and 9 deletions

View File

@ -74,10 +74,7 @@ namespace Sailboat.Generics
public static T? operator -(BoatsGenericCollection<T, U> collect, int pos)
{
T? obj = collect._collection[pos];
if (obj != null)
{
collect._collection.Remove(pos);
}
return obj;
}

View File

@ -48,11 +48,6 @@ namespace Sailboat.Generics
/// <returns></returns>
public bool Insert(T boat, int position)
{
if (boat == null)
{
throw new ArgumentNullException(nameof(boat));
}
if (position < 0 || position >= _maxCount)
throw new BoatNotFoundException(position);