From 959a419f829be51d72e09e7a4472761815112d38 Mon Sep 17 00:00:00 2001 From: timerix Date: Mon, 26 Sep 2022 21:35:39 +0600 Subject: [PATCH] IsNullOrEmpty --- DTLib.Dtsod/DtsodV23.cs | 3 +-- DTLib/Filesystem/OldFilework.cs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/DTLib.Dtsod/DtsodV23.cs b/DTLib.Dtsod/DtsodV23.cs index a4853ec..646d647 100644 --- a/DTLib.Dtsod/DtsodV23.cs +++ b/DTLib.Dtsod/DtsodV23.cs @@ -28,7 +28,7 @@ public class DtsodV23 : DtsodDict, IDtsod while (i < text.Length) { string name = ReadName(); - if (name == "") goto end; + if (name.IsNullOrEmpty()) goto end; dynamic value = ReadValue(out bool _); if (partOfDollarList) { @@ -250,7 +250,6 @@ public class DtsodV23 : DtsodDict, IDtsod case '[': value=ReadList(); goto case ';'; - break; case ']': endOfList = true; break; diff --git a/DTLib/Filesystem/OldFilework.cs b/DTLib/Filesystem/OldFilework.cs index c771425..489ddb4 100644 --- a/DTLib/Filesystem/OldFilework.cs +++ b/DTLib/Filesystem/OldFilework.cs @@ -45,7 +45,7 @@ public static class OldFilework value += st[i]; } 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; } }