Polymorphic custom configuration section
问题 Lets say I have the following configuration section.... <yak> <whaa hello="world" /> </yak> <yak> <whaa hello="world" blot="1" /> </yak> Because the second <whaa> element has the extra attribute on it I want to map it to a sub type of the the type that's mapped to the first <whaa> element. So how do I get polymorphic binding? 回答1: Here's one approach by using a programmatic solution which overrides the OnDeserializeUnrecognizedElement method of the ConfigurationSection class. The base and