有人能向我解释如何使用ConfigurationManager .config文件中的子部分吗?
这就是我到目前为止尝试过的(不起作用):
这是我的.config:http://pastebin.com/kxYGnD2j (对不起,我在为代码格式而挣扎)
Main.cs:http://pastebin.com/mWggzbD4
谢谢!
------EDIT-------
明白了!"SectionGroup“是我要找的:http://msdn.microsoft.com/en-us/library/system.configuration.configurationsectiongroup.aspx
只要改变一下.config,我的Main.cs就好了!
谢谢各位!
P.S.我现在不能自己回答,6小时后就能做好。
发布于 2011-11-11 08:30:24
明白了!"SectionGroup“是我要找的:http://msdn.microsoft.com/en-us/library/system.configuration.configurationsectiongroup.aspx
只要改变一下.config,我的Main.cs就好了!
谢谢各位!
发布于 2011-11-10 13:56:10
我认为您需要在配置文件中更改对NameValueSectionHandler的引用。它应该是这样的:type="System.Configuration.NameValueSectionHandler,System"其他一切看起来都很好。
https://stackoverflow.com/questions/8080471
复制相似问题