PIbd-22.Kurbanova A.A. Lab work 04 #4 #6
@ -12,7 +12,6 @@ namespace WarmlyLocomotive
|
||||
// see https://aka.ms/applicationconfiguration.
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new FormWarmlyLocomotiveCollection());
|
||||
Application.Run(new WarmlyLocomotiveForm());
|
||||
}
|
||||
}
|
||||
}
|
@ -51,13 +51,13 @@ namespace WarmlyLocomotive.Generics
|
||||
/// <summary>
|
||||
/// Добавление объекта в набор на конкретную позицию
|
||||
/// </summary>
|
||||
/// <param name="airplane">Добавляемый самолет</param>
|
||||
/// <param name="warmlylocomotive">Добавляемый тепловоз</param>
|
||||
/// <param name="position">Позиция</param>
|
||||
/// <returns></returns>
|
||||
public bool Insert(T airplane, int position)
|
||||
public bool Insert(T warmlylocomotive, int position)
|
||||
{
|
||||
if (!(position >= 0 && position <= Count && _places.Count < _maxCount)) return false;
|
||||
_places.Insert(position, airplane);
|
||||
_places.Insert(position, warmlylocomotive);
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user