In the MM Dev Guide, there is a section called "Application Settings Classes" under the "Overview of Mere Mortals .NET" section. There it explains "Specifying a Custom Configuration File". I have followed the instructions, but I can not get it to work properly.
1. I created a subclass of mmAppConfiguration called myAppConfig
2. In the constructor, I added the line
this.ReadKeysFromConfig("c:\\myFolder\\dst.config");
3. I want to do this Strongly Typed, so I added public fields to the class myAppConfig. For instance:
[DefaultValue("123"),
Description("SerialNumber"]
public string SerialNumber
{
get (return this._serialNumber; )
set
{
this._serialNumber = value;
}
}
private string _serialNumber = "123";
4. In the dst.config XML file, I have a section for
with the line:
add key="SerialNumber" value="9876543210"
Whenever I run, I always get the default value "123". I have tried stepping through the Framework code, but I can't see why it is not reading the setting from my file?
Any help is appreciated.
Kind Reagrds,
Mat