Исправление
This commit is contained in:
parent
9ac1ae9ee2
commit
fa88a6d316
@ -50,11 +50,6 @@ public class ListGenericObjects<T> : ICollectionGenericObjects<T>
|
||||
}
|
||||
public T? Get(int position)
|
||||
{
|
||||
// TODO проверка позиции
|
||||
if (position < Count && position >= 0)
|
||||
{
|
||||
return _collection[position];
|
||||
}
|
||||
if (position < 0 || position >= Count) throw new PositionOutOfRangeException(position);
|
||||
if (_collection[position] == null) throw new ObjectNotFoundException(position);
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user