I have subclassed the mmAppConfiguration class and set the class to use a different file name in the constructor method. If my class properties and config file keys match, everything works fine, but I am getting the error:
"Object reference not set to an instance of an object"
when a key is missing. Maybe I misread the documentation, but I thought this class would write out any missing keys? The section of code that is throwing the exception is in the WriteKeysToConfig() method which is being called by the ReadKeysFromConfig() method because there are missing keys. Below is the code:
// *** If we can't find the key - write it out to the document
string Value = null;
if (Field.MemberType == MemberTypes.Field)
Value = ((FieldInfo) Field).GetValue(this).ToString();
Thanks in advance for your help.
Kind Regards,
Mat