PIbd-13 Suslin V.S. HoistingCrane Simple LabWork07 #7

Closed
Sivby wants to merge 2 commits from LabWork07 into LabWork06
Showing only changes of commit fa88a6d316 - Show all commits

View File

@ -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;