Click to See Complete Forum and Search --> : Passing List/Combo Boxes in C#?
melegant
Jun 28th, 2002, 03:00 PM
Using C#, is it possible to send a list box or combo box to a method in a class?
I am trying to write a class with methods to populate any object i send it from dataset.
Thanks for any advice.
:eek:
DevGrp
Jun 28th, 2002, 09:38 PM
yes you can. My suggestion is to make the method take an object as a parameter. In the method body, use the is keyword to test if its a listbox or a combo box or whatever you want to populate, then cast to the whichever object you want to populate.
melegant
Jul 1st, 2002, 11:35 AM
worked like butter on bread thanks.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.