From c2da54a7e505bc3414ca448d1d670c1209aad807 Mon Sep 17 00:00:00 2001 From: "zuo.chunhui" Date: Wed, 22 Jul 2020 10:38:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=8A=A0?= =?UTF-8?q?=E8=BD=BDstring=E7=B1=BB=E5=9E=8B=E4=B8=BAnull=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E7=94=A8=E9=BB=98=E8=AE=A4=E5=80=BC=E8=B5=8B?= =?UTF-8?q?=E5=80=BC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Units/UBaseConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SunnyUI/Units/UBaseConfig.cs b/SunnyUI/Units/UBaseConfig.cs index 5bf694ed..80a9ce83 100644 --- a/SunnyUI/Units/UBaseConfig.cs +++ b/SunnyUI/Units/UBaseConfig.cs @@ -268,7 +268,7 @@ namespace Sunny.UI if (type == typeof(string)) { object value = idents[info.Name].Value; - info.SetValue(config, Convert.ChangeType(value, type), null); + info.SetValue(config, Convert.ChangeType(value==null? defaultobj: value, type), null); continue; }