Cдал лаб06
This commit is contained in:
parent
d246f06d90
commit
bf7ba3ecc4
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user