Ver Fonte

导出类型

Dun.Jason há 4 meses atrás
pai
commit
a4c9af33f0
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/Hotline/Tools/DynamicClassHelper.cs

+ 1 - 1
src/Hotline/Tools/DynamicClassHelper.cs

@@ -20,7 +20,7 @@ public class DynamicClassHelper
         foreach (var property in propInfos)
         {
             var propertyName = property.Prop.Trim().ToPascalCase();
-            var propertyType = typeof(string);
+            var propertyType = property.GetType();// typeof(string);
 
             FieldBuilder fieldBuilder = typeBuilder.DefineField("_" + propertyName, propertyType, FieldAttributes.Private);
             PropertyBuilder propertyBuilder = typeBuilder.DefineProperty(propertyName, PropertyAttributes.HasDefault, propertyType, null);