Hello Peter,
Thanks for posting in the group. I have tested it on my side and got the
same result as Nish.
I have replied this question in dotnet.languages.vc group. Could you please
check it when you have free time? I will follow up you there.
Best regards,
Yanhong Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
!From: "Peter Hemmingsen" <ph*@softco.dk>
!Subject: Exposing a "null" dotnet object
!Date: Thu, 11 Sep 2003 16:44:06 +0200
!Lines: 24
!X-Priority: 3
!X-MSMail-Priority: Normal
!X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
!X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
!Message-ID: <Oz**************@TK2MSFTNGP12.phx.gbl>
!Newsgroups:
microsoft.public.dotnet.languages.csharp,microsoft .public.dotnet.languages.v
c
!NNTP-Posting-Host: heimdal.softco.dk 80.199.79.33
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:28224
microsoft.public.dotnet.languages.csharp:184108
!X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
!
!Hi,
!
!I have a dotnet object (implemented in mc++ and used in c#) which have a
!property called "Info". The Info property is also a dotnet object
!(implemented in mc++). In the constructor of the "main" object I want to
!initialize the property "Info" to null in a way that will make the c#
!programmer (the user) able to write:
!
!if (MyObj.Info==null) {..}
!
!I've tried to initialize the Info property (in mc++) as follows:
!
!this->Info=0; // Note Info is a __gc class pointer
!
!but the above c# code always returns false.
!
!Any suggestions?
!
!Peter
!
!
!
!
!
!