I'm attempting to map values of properties (via reflection) between different objects. This appears to be failing oddly on nullable value types. The following code:
destProperty.SetValue(destObject, sourceProperty.GetValue(sourceObject, null), null);
sets destProperty to null
if destProperty is a nullable value type, despite sourceProperty having a value.
Surely this is a fairly common task - I must be missing something simple?