I have worked by below article.
http://www.jokecamp.com/blog/net-custom-configuration-section-collection-and-elements/
I can achieve if I do like what it said. But I want to remove parent node. I want xml to seems like below.
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="jobSection"
type="MyConfiguration.JobSection, MyConfiguration" />
</configSections>
<jobSection>
<job id="1" name="Job Name A" />
<job id="2" name="Job Name B" />
</jobSection>
</configuration>
I get an error Unrecognized element 'job'. if xml is like above.
How can I define a custom section by above xml ?
In your configuration class, you should define the
ConfigurationPropertyattribute on the collection with an empty string as name and with theIsDefaultCollectionproperty set to true: