Hey,
How can I assign 'null' value to a handle in C++/CLI?
I searched for this for some while now, finding nothing so far.
In C# I could write:
something = null;
or
if ( something == null ) ...
However, C++/CLI does not understand null. NULL is not defined, and it
shouldn't be. Also, in Managed C++ I could use 0 instead of null, but that
doesn't work either anylonger.
So, anyone has a solution? :-)
Thanks
-Lenard
Carl Daniel [VC++ MVP] - 23 Sep 2005 20:19 GMT
> Hey,
>
[quoted text clipped - 14 lines]
>
> So, anyone has a solution? :-)
nullptr
-cd
Geoffroy - 23 Sep 2005 21:36 GMT
Hi,
In C++/CLI, just write :
something = nullptr;
if (!something)
if (something == nullptr)
Geoffroy
> Hey,
>
[quoted text clipped - 17 lines]
> Thanks
> -Lenard