From 4f448847d76d91a7a0d2a753b0620959b3cc045e Mon Sep 17 00:00:00 2001 From: Timourka Date: Fri, 17 Nov 2023 23:20:15 +0400 Subject: [PATCH] lots of changes 2 laba 6 --- Laba1Loco/Laba1Loco/TrainsGenericStorage.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Laba1Loco/Laba1Loco/TrainsGenericStorage.cs b/Laba1Loco/Laba1Loco/TrainsGenericStorage.cs index 8dc6c20..2822f92 100644 --- a/Laba1Loco/Laba1Loco/TrainsGenericStorage.cs +++ b/Laba1Loco/Laba1Loco/TrainsGenericStorage.cs @@ -38,7 +38,7 @@ namespace Laba1Loco foreach (KeyValuePair> record in _trainStorages) { StringBuilder records = new StringBuilder(); - foreach (DrawingTrain elem in record.Value.GetTrains.Reverse()) + foreach (DrawingTrain elem in record.Value.GetTrains) { records.Append($"{elem?.GetDataForSave(_separatorForObject)}{_separatorRecords}"); } @@ -84,7 +84,7 @@ namespace Laba1Loco } TrainsGenericCollection collection = new(_pictureWidth, _pictureHeight); string[] set = record[1].Split(_separatorRecords, StringSplitOptions.RemoveEmptyEntries); - foreach (string elem in set) + foreach (string elem in set.Reverse()) { DrawingTrain car = elem?.CreateDrawingTrain(_separatorForObject, _pictureWidth, _pictureHeight); if (car != null)