Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Problem with nullable property of object

0
0
If all of that is correct, what other return types should override MarshalNullAsDispatch? One thing that comes to mind is nullable numerics such as int?. Anything else?
Only host members with strongly typed objects that derive from the Object class with specific reference type can return DispatchWrapper(null) in case of null.
Host members like string, object, nullable<T> should return DBNull.
I'm not sure about DBNull, because .NET marshal a null value as VT_EMPTY and not as VT_NULL like DBNull

http://msdn.microsoft.com/en-us/library/2x07fbw8%28v=vs.110%29.aspx

Viewing all articles
Browse latest Browse all 2297