OK, found it, after a lot of hassle:
to return null, just do
return Nullable<double>();
to return non-null:
return Nullable<double>(12321);
It is important to declare the return value as Nullable<double>
and not Nullable<double>^
, as if you do it, when using other languages as C# and vb.net, you'll see the type as ValueType
instead of double?
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…