Re: Check for null object
- From: "Daniel" <DanielV@xxxxxxxxxxxxxxxx>
- Date: Tue, 19 Sep 2006 20:10:28 +0100
myClass test = new test();
test = null;
if(test == null)
{
System.Windows.Forms.MessageBox.Show("I am an idiot");
}
"Tarun Mistry" <nospam@xxxxxxxxxx> wrote in message
news:%23TNVbwB3GHA.2196@xxxxxxxxxxxxxxxxxxxxxxx
Hi guys,
what is the best/correct way to check for a NULL object?
I.e.
myClass test;
if(test == null) {}
This doesnt work.
Thanks
Taz
.
- Follow-Ups:
- Re: Check for null object
- From: John B
- Re: Check for null object
- References:
- Check for null object
- From: Tarun Mistry
- Check for null object
- Prev by Date: Re: Check for null object
- Next by Date: Is this a bug?
- Previous by thread: Re: Check for null object
- Next by thread: Re: Check for null object
- Index(es):