From 20fa07507f5ed86a404be2d69b4034ba33202a7c Mon Sep 17 00:00:00 2001 From: Nikita Date: Tue, 25 Feb 2025 21:01:20 +0400 Subject: [PATCH] delete useless comments --- .../CollectionGenericObjects/MassiveGenericObjects.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ProjectCatamaran/ProjectCatamaran/CollectionGenericObjects/MassiveGenericObjects.cs b/ProjectCatamaran/ProjectCatamaran/CollectionGenericObjects/MassiveGenericObjects.cs index e69bbfd..a9c52a4 100644 --- a/ProjectCatamaran/ProjectCatamaran/CollectionGenericObjects/MassiveGenericObjects.cs +++ b/ProjectCatamaran/ProjectCatamaran/CollectionGenericObjects/MassiveGenericObjects.cs @@ -26,7 +26,6 @@ public class MassiveGenericObjects : ICollectionGenericObjects where T : c } public T? Get(int position) { - //todo if (position >= 0 && position < Count) { return _collection[position]; @@ -36,7 +35,6 @@ public class MassiveGenericObjects : ICollectionGenericObjects where T : c } public int Insert(T obj) { - //todo for (int i = 0; i < Count; i++) { if (_collection[i] == null) @@ -49,13 +47,11 @@ public class MassiveGenericObjects : ICollectionGenericObjects where T : c return -1; } public int Insert(T obj, int position) - { - //todo + { if (!(position > 0 && position < _collection.Length)) { return -1; } - if (_collection[position] == null) _collection[position] = obj; else @@ -68,7 +64,6 @@ public class MassiveGenericObjects : ICollectionGenericObjects where T : c return i; } } - for (int i = position - 1; i >= 0; i--) { if (_collection[i] == null) @@ -86,7 +81,6 @@ public class MassiveGenericObjects : ICollectionGenericObjects where T : c { return null; } - T? deletedElement = _collection[position]; _collection[position] = null; return deletedElement;