Link to home
Start Free TrialLog in
Avatar of quiTech
quiTechFlag for Canada

asked on

VB.NET Windows App - Optional Sub Parameter byRef Object default no reference

Hello,

I have a VB.NET Sub routine with 3 parameters.  The last is " ByRef Optional ilsList As ImageList".

What the routine does internally varies, depending on whether it is called with an ImageList reference.  I therefore need to be able to check if this parameter was called.

I guess I need to assign a DEFAULT value to this reference... not sure how to do this.  I assumed maybe assigning NULL would work and allow me to do an ISREFERENCE() check against the ilsList object.  But this doesn't seem to work.

Any ideas?

Thanks in advance!
ASKER CERTIFIED SOLUTION
Avatar of Edy_l
Edy_l

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
I think Edy_l is right
Avatar of quiTech

ASKER

Works great!  Thanks