Final
This commit is contained in:
parent
8be22de9a8
commit
85f5d7f093
@ -29,7 +29,10 @@ namespace DoubleDeckerBus
|
|||||||
|
|
||||||
public int Insert(T bus, int position)
|
public int Insert(T bus, int position)
|
||||||
{
|
{
|
||||||
// TODO Проверка на уникальность
|
if (_places.Contains(bus))
|
||||||
|
{
|
||||||
|
throw new ArgumentException("The same bus exist");
|
||||||
|
}
|
||||||
|
|
||||||
if (position < 0 || position >= _maxCount)
|
if (position < 0 || position >= _maxCount)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user