public class Cfg : ConfigurationElement [ConfigurationProperty("prop", IsRequired = true)]string)this["prop"]; } }
public class ErrorCfg : ConfigurationElement
pi.Name}] of object type [{GetTypeName(obj)}]: {ex.Message}"); }
}附注:我不想使用接口,因为在每个属性中添加一个调用会非常麻烦。我在问,因为ConfigurationElement有它的索引器,所以在这个基类上可能有一种我不知道的方法。