fix
This commit is contained in:
parent
8ebc7de21d
commit
644a928f8e
@ -79,7 +79,7 @@ namespace PIbd_23_Ivanov_V.N._DoubleDeckerBus._Base.Generics
|
||||
/// <returns></returns>
|
||||
public void Remove(int position)
|
||||
{
|
||||
if (position < 0 || position >= Count)
|
||||
if (!(position >= 0 && position < Count))
|
||||
{
|
||||
throw new BusNotFoundException(position);
|
||||
}
|
||||
@ -96,7 +96,7 @@ namespace PIbd_23_Ivanov_V.N._DoubleDeckerBus._Base.Generics
|
||||
{
|
||||
get
|
||||
{
|
||||
if (position < 0 || position >= _maxCount)
|
||||
if (!(position >= 0 && position < Count))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@ -109,9 +109,7 @@ namespace PIbd_23_Ivanov_V.N._DoubleDeckerBus._Base.Generics
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_places.Insert(position, value);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user