quiTech
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!
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think Edy_l is right
ASKER
Works great! Thanks