Cдал лаб06

This commit is contained in:
ivans 2024-05-08 13:29:38 +04:00
parent d246f06d90
commit bf7ba3ecc4
2 changed files with 3 additions and 7 deletions

View File

@ -162,11 +162,7 @@ public class StorageCollection<T>
string strs = "";
while ((strs = fs.ReadLine()) != null)
{
//по идее этого произойти не должно
//if (strs == null)
//{
// return false;
//}
string[] record = strs.Split(_separatorForKeyValue, StringSplitOptions.RemoveEmptyEntries);
if (record.Length != 4)
{
@ -185,7 +181,7 @@ public class StorageCollection<T>
if (elem?.CreateDrawningBasicSeaplane() is T seaplane)
{
if (collection.Insert(seaplane) == -1)
{
{
return false;
}
}

View File

@ -60,7 +60,7 @@ public class EntitySeaplane : EntityBasicSeaplane
/// <returns></returns>
public static EntitySeaplane? CreateEntitySeaplane(string[] strs)
{
if (strs.Length != 8 || strs[0] != nameof(EntitySeaplane))
if (strs.Length != 7 || strs[0] != nameof(EntitySeaplane))
{
return null;
}