T
ThisBytes5
I am trying to save/retreive some settings from a database using
reflection an my custom attributes. The field in teh database is a
string, but my property is a boolen. I have the following code:
pi.SetValue(settingsObject, GetSettingFromDb(attribute.SettingName),
null);
When I run this, I receive the following error:
Object of type 'System.String' cannot be converted to type
'System.Boolean'.
I've not yet figured out how to determine if the property is a Boolean
thus have to parse the string that comes back, or if there is a way to
use SetValue and have it do this for me.
Any help would be appreciated.
reflection an my custom attributes. The field in teh database is a
string, but my property is a boolen. I have the following code:
pi.SetValue(settingsObject, GetSettingFromDb(attribute.SettingName),
null);
When I run this, I receive the following error:
Object of type 'System.String' cannot be converted to type
'System.Boolean'.
I've not yet figured out how to determine if the property is a Boolean
thus have to parse the string that comes back, or if there is a way to
use SetValue and have it do this for me.
Any help would be appreciated.