- How to: Create Custom Configuration Sections Using ConfigurationSection
- (Old approach)How to: Create Custom Configuration Sections Using IConfigurationSectionHandler
- Unraveling the Mysteries of .NET 2.0 Configuration
- ConfigurationProperty Class
Note:
Suppose we have some custom configuration section.
BaseBatchSection config1 = (BaseBatchSection)ConfigurationManager.GetSection("mySectionTag");if ConfigurationElement property (for instance Emails) was not provided in the configuration file (there were no even corresponding tag) then config1.Emails !=nulll, but config1.Emails.ElementInformation.IsPresent will be false
Took me long to figure out how to work with it. I tried to force config1.Emails = null.It's not supposed to work like this.