IsNullOrEmpty

This commit is contained in:
timerix 2022-09-26 21:35:39 +06:00
parent dde887f1d1
commit 959a419f82
2 changed files with 2 additions and 3 deletions

View File

@ -28,7 +28,7 @@ public class DtsodV23 : DtsodDict<string, dynamic>, IDtsod
while (i < text.Length) while (i < text.Length)
{ {
string name = ReadName(); string name = ReadName();
if (name == "") goto end; if (name.IsNullOrEmpty()) goto end;
dynamic value = ReadValue(out bool _); dynamic value = ReadValue(out bool _);
if (partOfDollarList) if (partOfDollarList)
{ {
@ -250,7 +250,6 @@ public class DtsodV23 : DtsodDict<string, dynamic>, IDtsod
case '[': case '[':
value=ReadList(); value=ReadList();
goto case ';'; goto case ';';
break;
case ']': case ']':
endOfList = true; endOfList = true;
break; break;

View File

@ -45,7 +45,7 @@ public static class OldFilework
value += st[i]; value += st[i];
} }
reader.Close(); reader.Close();
//if (value == "") throw new System.Exception($"ReadFromConfig({configfile}, {key}) error: key not found"); //if (value.NullOrEmpty()) throw new System.Exception($"ReadFromConfig({configfile}, {key}) error: key not found");
return value; return value;
} }
} }