How to know a form is closed

R

Richard

SamSpade said:
I was afraid that it would evaluate (f.IsDisposed) when f was Nothing.

Thanks

No "OrElse" as well as "AndAlso" are whats called short circuiting
conditionals.
If the first evaluates to true the second is not evaluated - They can
be very handy of each of the conditions requires a bit of grunt to run
it - say if you were calling functions that returned Bools.

I use them almost every time i use i datareader:

If dr is Nothing Orlelse not (Dr.Read) then return nothing

Man i cant tell you how often ive written that line of code....
hundreds...
"Or" as well as "And" would evaluate the way you described.

Hth
Richard
 
S

SamSpade

thanks

Richard said:
" SamSpade" <[email protected]> wrote in message

No "OrElse" as well as "AndAlso" are whats called short circuiting
conditionals.
If the first evaluates to true the second is not evaluated - They can
be very handy of each of the conditions requires a bit of grunt to run
it - say if you were calling functions that returned Bools.

I use them almost every time i use i datareader:

If dr is Nothing Orlelse not (Dr.Read) then return nothing

Man i cant tell you how often ive written that line of code....
hundreds...
"Or" as well as "And" would evaluate the way you described.

Hth
Richard
 

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