diff --git a/ProjectContainerShip/ProjectContainerShip/CollectionGenericObjects/ListGenericObjects.cs b/ProjectContainerShip/ProjectContainerShip/CollectionGenericObjects/ListGenericObjects.cs index 9c601bf..c01e667 100644 --- a/ProjectContainerShip/ProjectContainerShip/CollectionGenericObjects/ListGenericObjects.cs +++ b/ProjectContainerShip/ProjectContainerShip/CollectionGenericObjects/ListGenericObjects.cs @@ -71,7 +71,7 @@ public class ListGenericObjects : ICollectionGenericObjects public T Remove(int position) { if (position >= Count || position < 0) return null; - T obj = _collection[position]; + T? obj = _collection[position]; _collection.RemoveAt(position); return obj; diff --git a/ProjectContainerShip/ProjectContainerShip/CollectionGenericObjects/MassiveGenericObjects.cs b/ProjectContainerShip/ProjectContainerShip/CollectionGenericObjects/MassiveGenericObjects.cs index 42e883b..d82c085 100644 --- a/ProjectContainerShip/ProjectContainerShip/CollectionGenericObjects/MassiveGenericObjects.cs +++ b/ProjectContainerShip/ProjectContainerShip/CollectionGenericObjects/MassiveGenericObjects.cs @@ -93,7 +93,7 @@ public class MassiveGenericObjects : ICollectionGenericObjects { return null ; } - T obj = _collection[position]; + T? obj = _collection[position]; _collection[position] = null; return obj; }