我想了解如何引用app.config中的类。在这种情况下,我想配置和微软统一延长在App.config如何在app.config中指定类的类型?
<extension type="?, ?" />
是否type="assemblyName, namespace.class"
?
我想了解如何引用app.config中的类。在这种情况下,我想配置和微软统一延长在App.config如何在app.config中指定类的类型?
<extension type="?, ?" />
是否type="assemblyName, namespace.class"
?
您需要specify the fully qualified type name:
完全限定的类型名称由程序集名称规范,命名空间规格和类型的名字。
样品:
"System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
在某些情况下,你只需要在 “命名空间+类型名称,组件名称”:
"System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework"
我不知道是什么语法统一使用,但是标准语法(例如配置部分)是Namespace1.Namespace2.ClassName, AssemblyName
。