mental block...

  • Thread starter Thread starter craig
  • Start date Start date
C

craig

I am having a mental block...

What is the method for determining if an oject has been instantaited in C#?

Ex:

Dataset d;

How can I tell if d has been instantiated?

Yea, I know. Kinda trivial but I can't find the answer in any of my
references.
 
Craig,

If it is a reference type, then you can check to see if it is null, like
this:

if (d == null)

Hope this helps.
 
Back
Top