check this out
Type configPropType = configurableProp.getPropertyType();
string attValue = xmlelement.GetAttribute(configurableProp.getName());
configProps[configurableProp.getName()] = attValue;
At the point where I am setting the value that got read in from XML it turns out the assigning object needs to be parsed to the correct type for it to work. I need something like.
configProps[configurableProp.getName()] = configPropType.ParseToThisType(attValue);
Looked around on msdn but its a very confusing place.