How to pass nullable types to .Net
juancentro opened this issue · 1 comments
I have a .Net method that has the following signature
public static void RequestHistory(string ric, DateTime? from, DateTime? to, int? n)
I can return nullable types from .Net methods and they are wrapped nicely.
However, if I try to pass NULL
as a parameter, I get an error, because the NULL
gets wrapped as a SymbolicExpression
. Something similar happens if I pass a zero length array (e.g., integer(0)
).
My last attemp was passing a NA
of a correct mode (e.g, NA_integer_
but this isn't interpreted as null
on the .NET side.
Hi,
.NET not having native support for missing values (fair enough for a general purpose language), there is still quite a bit of work to do to emulate it, especially with respect to nullable types. Given my current work commitments I cannot look at this in the coming weeks, but a description of the use case(s) in posts in this issue is useful.
Apologies for the very delayed reply.