mental block...

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.
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top