public void FunctionA(Object element) { element.Items.Clear(); } Example of use:
FunctionA(checkedListBox1); The FunctionA function will be supplied with arguments only checkedListBox and comboBox , both elements have a method .Items.Clear() ;
How to make it work?