Results 1 to 3 of 3

Thread: Passing List/Combo Boxes in C#?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Location
    NY
    Posts
    8

    Talking 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.

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    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.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Location
    NY
    Posts
    8
    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
  •  



Click Here to Expand Forum to Full Width