PI-12_Zaytsev_A.V_LabWork03_Base #6
@ -75,12 +75,12 @@ public class MassiveGenericObjects<T> : ICollectionGenericObjects<T>
|
||||
}
|
||||
while (copy_of_position > 0)
|
||||
{
|
||||
if (_collection[position] == null)
|
||||
if (_collection[copy_of_position] == null)
|
||||
{
|
||||
_collection[position] = obj;
|
||||
return position;
|
||||
_collection[copy_of_position] = obj;
|
||||
return copy_of_position;
|
||||
}
|
||||
position--;
|
||||
copy_of_position--;
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user