|
-
Jun 28th, 2002, 03:00 PM
#1
Thread Starter
New Member
Passing List/Combo Boxes in C#?
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.
-
Jun 28th, 2002, 09:38 PM
#2
Frenzied Member
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.
Last edited by DevGrp; Jun 28th, 2002 at 09:42 PM.
-
Jul 1st, 2002, 11:35 AM
#3
Thread Starter
New Member
worked like butter on bread thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|