|
-
Dec 13th, 2004, 04:52 AM
#1
Thread Starter
Frenzied Member
Pass Listbox to a function
I have developed a function in a class which takes argument of type ListControl. Now, from my form, I need to pass the reference of my listbox to the function and the function will then add items to listbox. How do I pass the reference of the listbox or combobox to the function.
The signature of the method is this :
public void Fill(ref ListControl thisList)
Thanks
-
Dec 13th, 2004, 11:29 AM
#2
Banned
Re: Pass Listbox to a function
 Originally Posted by usamaalam
I have developed a function in a class which takes argument of type ListControl. Now, from my form, I need to pass the reference of my listbox to the function and the function will then add items to listbox. How do I pass the reference of the listbox or combobox to the function.
The signature of the method is this :
public void Fill(ref ListControl thisList)
Thanks
Just pass the entire listbox.
Then in the procedure you do:
void foo(ref Listbox x)
....
Jon
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
|