Re: Using a control as part of an exression

"Bhatnagar, Amit" <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Message-ID <[email protected]>
Why don't you want to create 2 overloads?  

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:[email protected]] On Behalf Of
Bell, Matthew (Energy Wholesale)
Sent: Monday, April 16, 2007 7:33 AM
To: [email protected]
Subject: [DOTNET-WINFORMS] Using a control as part of an exression

I am creating a procedure that can be used with both treeviews and
listboxes, and will take a control as one of the arguments. To save
myself having to create 2 overload procedures I would like to create 1
that recognises when it has a listbox, and when it has a treeview, so
that it can process the data appropriately. I have tried looking around
for answers without much luck. 

So... how do I use a control (such as a listbox) as an argument in an
expression. I.e.:
If control is a listbox then...

Thanks
Matt Bell
___________________________ Disclaimer Notice ____________________ This
message and any attachments are confidential and should only be read by
those to whom they are addressed. If you are not the intended recipient,
please contact us, delete the message from your computer and destroy any
copies. Any distribution or copying without our prior permission is
prohibited.

Internet communications are not always secure and therefore the E.ON
Group does not accept legal responsibility for this message.
The recipient is responsible for verifying its authenticity before
acting on the contents. Any views or opinions presented are solely those
of the author and do not necessarily represent those of the E.ON Group.

E.ON UK plc, Westwood Way, Westwood Business Park, Coventry, CV4 8LG.
Registered in England & Wales No. 2366970

E.ON UK Trading Ltd, Westwood Way, Westwood Business Park, Coventry, CV4
8LG Registered in England & Wales No. 4178314

E.ON UK Trading Ltd is authorised and regulated by the Financial
Services Authority to carry out energy investment activities.

Telephone +44 (0) 2476 42 4000
Fax +44 (0) 2476 42 5432

The information contained in this e-mail message is PRIVATE. It may contain confidential information and may be legally privileged. It is intended for the exclusive use of the addressee(s). If you are not the intended recipient, you are hereby notified that any dissemination, distribution or reproduction of this communication is strictly prohibited. If the intended recipient(s) cannot be reached or if a transmission problem has occurred, please notify the sender immediately by return e-mail and destroy all copies of this message. 
Thank you.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.