diff --git a/PIbd-23_Ivanov_V.N._DoubleDeckerBus._Base/PIbd-23_Ivanov_V.N._DoubleDeckerBus._Base/Generics/SetGeneric.cs b/PIbd-23_Ivanov_V.N._DoubleDeckerBus._Base/PIbd-23_Ivanov_V.N._DoubleDeckerBus._Base/Generics/SetGeneric.cs index c8b77f0..cb78928 100644 --- a/PIbd-23_Ivanov_V.N._DoubleDeckerBus._Base/PIbd-23_Ivanov_V.N._DoubleDeckerBus._Base/Generics/SetGeneric.cs +++ b/PIbd-23_Ivanov_V.N._DoubleDeckerBus._Base/PIbd-23_Ivanov_V.N._DoubleDeckerBus._Base/Generics/SetGeneric.cs @@ -79,7 +79,7 @@ namespace PIbd_23_Ivanov_V.N._DoubleDeckerBus._Base.Generics /// 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; } }