PIbd-21 Yakovlev M.G. lab work 03 #3

Closed
YakovlevMaxim wants to merge 3 commits from Lab3SailBoat into Lab2SailBoat
Showing only changes of commit 773e1b74fb - Show all commits

View File

@ -18,7 +18,7 @@ namespace SailBoat.Generics
_places = new T[Count];
}
public int Insert(T car)
public int Insert(T boat)
{
int index = 0;
Review

Правильнее было вызвать Insert(T obj, 0);

Правильнее было вызвать Insert(T obj, 0);
while (_places[index] != null) {
@ -31,11 +31,11 @@ namespace SailBoat.Generics
_places[index] = _places[index - 1];
index--;
}
_places[0] = car;
_places[0] = boat;
return 0;
}
public bool Insert(T car, int position)
public bool Insert(T boat, int position)
{
if (position < 0 || position >= Count)
{