Need to set properties of a class via reflection.
I have a dictionary with property names and string values.
Inside a reflection loop - I need to convert the string value to appropriate property type while setting the value for each property. Some of these property types are nullable types.
- How to konw from PropertyInfo if the prop is a nullable type ?
- How to set a nullable type via reflection.
edit: The first method defined in the comments on this blog seems to do the trick as well: http://weblogs.asp.net/pjohnson/archive/2006/02/07/437631.aspx