Using a control as part of an exression
"Bell, Matthew (Energy Wholesale)" <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <76E88266439DD345A3B35C84E81887C6073E4CB0@CORWWPKSEXV02.corp.pg.eon.net> |
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