Has been assigned to what? Do you mean if the reference is valid? In
that case it's the same as any other object, which is just what you've
written...
DataTable myDT;
if( myDT == null ) // this will be true
myDT = new DataTable();
if( myDT == null ) // this will be false
On Tue, 07 Dec 2004 03:10:08 -0000, Keith R. Pinster
<keith.pinster@xxxxxxxxx> wrote:
>
>
> What is the syntax for the if statement to see if a DataTable has
> been assigned?
>
> i.e.
>
> if (myDT == null)
> {
> //Do something
> }
>
> "myDT == null" isn't right, but what is?
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/dpFolB/TM
--------------------------------------------------------------------~->
|