By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,972 Members | 1,454 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,972 IT Pros & Developers. It's quick & easy.

The New & Improved System.Configuration

P: n/a
For a while now, I have been accustomed to defining my application's
configuration values in the application configuration file in a custom
section. In the implementation of my
IConfigurationSectionHandler::Create method, I typically instantiate my
own user-defined type that is actually the output of the xsd.exe tool's
consumption of my configuration schema (xsd). That is, I'm using XML
serialization to hydrate the type from the config file.

So a representative code snippet -- where my type is
CheckerConfiguration -- would look like:

public object Create(object parent, object configContext,
System.Xml.XmlNode Section) {

CheckerConfiguration Result;

XmlSerializer Hydrator = new
XmlReader Reader = new XmlNodeReader(section);

try {
Result = (CheckerConfiguration) Hydrator.Deserialize(Reader);
finally {
return Result;

With version 2.0 of the framework, System.Configuration has been beefed
up. I've noticed that they've also deprecated the use of
IConfigurationSectionHandler. Is there a similar technique for doing
this with 2.0? I've read through the documentation of some of the new
classes and they all seem to be geared towards defining the
configuration with custom attributes rather than doing so in the manner
I've described.

Thanks for any information.

Dec 6 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.