Section de configuration personnalisée dans App.config C #

Je suis tout à fait débutant avec les sections de configuration en c#
Je veux créer une section personnalisée dans le fichier de configuration. Ce que j'ai essayé après googler est comme suit
Fichier de configuration:

    <?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <sectionGroup name="MyCustomSections">
      <section name="CustomSection" type="CustomSectionTest.CustomSection,CustomSection"/>
    </sectionGroup>
  </configSections>

  <MyCustomSections>
    <CustomSection key="Default"/>
  </MyCustomSections>
</configuration>

CustomSection.cs

    namespace CustomSectionTest
{
    public class CustomSection : ConfigurationSection
    {
        [ConfigurationProperty("key", DefaultValue="Default", IsRequired = true)]
        [StringValidator(InvalidCharacters = "~!@#$%^&*()[]{}/;'\"|\\", MinLength = 1, MaxLength = 60)]
        public String Key
        {
            get { return this["key"].ToString(); }
            set { this["key"] = value; }
        }
    }
}

Lorsque j'utilise ce code pour récupérer l'Article, j'obtiens un message d'erreur disant erreur de configuration.

var cf = (CustomSection)System.Configuration.ConfigurationManager.GetSection("CustomSection");

Ce qui me manque?
Merci.

Modifier

Ce dont j'ai besoin en fin de compte est

    <CustomConfigSettings>
    <Setting id="1">
        <add key="Name" value="N"/>
        <add key="Type" value="D"/>
    </Setting>
    <Setting id="2">
        <add key="Name" value="O"/>
        <add key="Type" value="E"/>
    </Setting>
    <Setting id="3">
        <add key="Name" value="P"/>
        <add key="Type" value="F"/>
    </Setting>
</CustomConfigSettings>

source d'informationauteur Chaturvedi Dewashish