ConfigurationProperty and DefaultValue
Hi
I have a class derived from ConfigurationSection which has the following
property:
[ConfigurationProperty("importUserName", DefaultValue="system", IsRequired =
true)]
public string ImportUserName {
get {
return (string)base["importUserName"];
}
set {
base["importUserName"] = value;
}
}
In my app.config, the initial value for importUserName="". Therefore I
expect that the ConfigurationProperty will automatically assign the
DefaultValue to the property, of course it doesn't...
Am I missing something, appreciate any feedback.
Craig
Date:Wed, 1 Aug 2007 20:56:01 -0700
Author:
|