How to use Nullable types in c++/cli?

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?.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)