Упрощено выражение с new

This commit is contained in:
Danil Malin 2022-10-27 20:07:51 +04:00
parent c789de973c
commit 5c51aa1122

View File

@ -76,7 +76,7 @@ namespace WarmlyLocomotive
{ {
return; return;
} }
DrawningObjectLocomotive locomotive = new DrawningObjectLocomotive(drawningLocomotive); DrawningObjectLocomotive locomotive = new(drawningLocomotive);
if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + locomotive != -1) if (_mapsCollection[listBoxMaps.SelectedItem?.ToString() ?? string.Empty] + locomotive != -1)
{ {
MessageBox.Show("Объект добавлен"); MessageBox.Show("Объект добавлен");