I have the following code, which I thought would work:
property Nullable<double> Angle {
Nullable<double> get() {
return nullptr;
}
}
It doesn’t. How can I do it? Does c++/CLI even support nullable types?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
OK, found it, after a lot of hassle:
to return null, just do
to return non-null:
It is important to declare the return value as
Nullable<double>and notNullable<double>^, as if you do it, when using other languages as C# and vb.net, you’ll see the type asValueTypeinstead ofdouble?.