Browse Source

配置文件加载string类型为null时,使用默认值赋值。

pull/95/head
zuo.chunhui 5 years ago
parent
commit
c2da54a7e5
  1. 2
      SunnyUI/Units/UBaseConfig.cs

2
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;
}

Loading…
Cancel
Save