diff --git a/ProjectStormtrooper/ProjectStormtrooper/SetGeneric.cs b/ProjectStormtrooper/ProjectStormtrooper/SetGeneric.cs index 51f90cd..3fd411d 100644 --- a/ProjectStormtrooper/ProjectStormtrooper/SetGeneric.cs +++ b/ProjectStormtrooper/ProjectStormtrooper/SetGeneric.cs @@ -66,7 +66,7 @@ namespace ProjectStormtrooper public T? Remove(int position) { // Проверка позиции - if (Count == 0 || position < 0 || position >= _maxCount) + if (position < 0 || position >= Count) { return null; } @@ -85,7 +85,7 @@ namespace ProjectStormtrooper get { // Проверка позиции - if (position < 0 || position >= _maxCount) + if (position < 0 || position >= Count) { return null; }