Can I add a textnode instead of an attribute in a .NET configurationsection?

I currently have a .NET custom configurationsection that looks like this:

<customSection name="My section" />

What I want is to write it as a textnode (I'm not sure if this is the correct term?) like this:

<customSection>
  <name>My Section</name>
</customSection>

My current customSection class looks like this:

public class CustomSection: ConfigurationSection {

  [ConfigurationProperty("name")]
  public String Name {
    get {
      return (String)this["name"];
    }
  }

}

What should I do to make it a textnode?

17
задан Kristian Frost 22 February 2011 в 13:29
поделиться