Merge branch 'LabWork06' into LabWork07

This commit is contained in:
Evgeny Egov 2024-01-06 20:27:46 +04:00
commit 9b8c08ddbe
Failed to extract signature

View File

@ -25,11 +25,18 @@ public class MassiveGenericObjects<T> : ICollectionGenericObjects<T>
set set
{ {
if (value > 0) if (value > 0)
{
if (_collection.Length > 0)
{
Array.Resize(ref _collection, value);
}
else
{ {
_collection = new T?[value]; _collection = new T?[value];
} }
} }
} }
}
public CollectionType GetCollectionType => CollectionType.Massive; public CollectionType GetCollectionType => CollectionType.Massive;