我有一个 App.conf 文件,其中包含:
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="CrystalReport" type="System.Configuration.SingleTagSectionHandler" />
</configSections>
<CrystalReport Database="Test" />
</configuration>
如您所见,在 configSections 中定义了 CrystalReport 部分。但是当我这样做时:config.GetSection("CrystalReport") 它返回一个 DefaultSection 对象而不是 SingleTagSectionHandler。
如何使用 ConfigurationManager 从 CrystalReport 标记中检索数据库属性?
问候