OK, so:
- The problem occurs only when
MarshalNullAsDispatch
is in effect. -
Host members (fields, properties, methods) that return strings should override
MarshalNullAsDispatch
and marshal null return values asDBNull
.
MarshalNullAsDispatch
? One thing that comes to mind is nullable numerics such as int?
. Anything else?