By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,333 Members | 1,391 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,333 IT Pros & Developers. It's quick & easy.

mental block...

P: n/a
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.
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"craig" <e@mail.com> wrote in message
news:O9***************@tk2msftngp13.phx.gbl...
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.

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.