This commit is contained in:
Данила Никифоров 2024-04-22 22:53:40 +04:00
parent 3fd45b6f3b
commit 2bad6f12a1
2 changed files with 0 additions and 22 deletions

View File

@ -62,7 +62,6 @@ namespace ProjectBoat.CollectionGenericObjects
_collection[position] = obj;
return position;
}
int index;
for (index = position + 1; index < _collection.Length; ++index)
{
@ -83,15 +82,6 @@ namespace ProjectBoat.CollectionGenericObjects
}
return -1;
}
public T Remove(int position)
{
// TODO проверка позиции
// TODO удаление объекта из массива, присвоив элементу массива значение null
if (position >= _collection.Length || position < 0)
{ return null; }
T drawningBoat = _collection[position];
_collection[position] = null;
return drawningBoat;
}
}
}

View File

@ -31,7 +31,6 @@
groupBoxTools = new GroupBox();
maskedTextBoxPosision = new MaskedTextBox();
buttonRefresh = new Button();
buttonGetToTest = new Button();
ButtonRemoveBoat = new Button();
ButtonAddMBoat = new Button();
ButtonAddBoat = new Button();
@ -78,17 +77,6 @@
buttonRefresh.UseVisualStyleBackColor = true;
buttonRefresh.Click += ButtonRefresh_Click;
//
// buttonGetToTest
//
buttonGetToTest.Anchor = AnchorStyles.Right;
buttonGetToTest.Location = new Point(20, 366);
buttonGetToTest.Name = "buttonGetToTest";
buttonGetToTest.Size = new Size(186, 40);
buttonGetToTest.TabIndex = 4;
buttonGetToTest.Text = "передать на тесты";
buttonGetToTest.UseVisualStyleBackColor = true;
buttonGetToTest.Click += ButtonGetToTest_Click;
//
// ButtonRemoveBoat
//
ButtonRemoveBoat.Anchor = AnchorStyles.Right;