Link to home
Start Free TrialLog in
Avatar of James_Wyatt
James_Wyatt

asked on

How to tell if a variable contains an object

I've created a form and stored it in a variable, however i need to be able to tell if the form has already been created and stored so that i don't do it again.

How do i do it? There used to be IsObject in VB6.
ASKER CERTIFIED SOLUTION
Avatar of Ravi Singh
Ravi Singh
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of James_Wyatt
James_Wyatt

ASKER

Cheers i narrowed it down to

if (myResults == null || myResults.IsDisposed)

had to add is disposed incase someone had closed the form.