Минорные изменения

This commit is contained in:
Tonb73 2024-05-11 12:22:35 +03:00
parent 5a6e81bb56
commit c702afd01e

View File

@ -192,11 +192,11 @@ where T : DrawningLocomotive
string[] set = record[3].Split(_separatorItems, StringSplitOptions.RemoveEmptyEntries);
foreach (string elem in set)
{
if (elem?.CreateDrawningLocomotive() is T truck)
if (elem?.CreateDrawningLocomotive() is T locomotive)
{
try
{
if (collection.Insert(truck) == -1)
if (collection.Insert(locomotive) == -1)
{
throw new Exception("Объект не удалось добавить в коллекцию: " + record[3]);
}