This commit is contained in:
shadowik 2022-12-12 20:33:30 +04:00
parent 8be22de9a8
commit 85f5d7f093

View File

@ -29,7 +29,10 @@ namespace DoubleDeckerBus
public int Insert(T bus, int position)
{
// TODO Проверка на уникальность
if (_places.Contains(bus))
{
throw new ArgumentException("The same bus exist");
}
if (position < 0 || position >= _maxCount)
{