呼び出しパラメーターとしてTListboxまたはTChecklistBoxをサポートする関数を作成したい
MyUISupportFunction ( ...... ; aListBox : TObject);
if (aListBox as TObject) is TListBox then (aListBox as TListbox).Items.Clear;
if (aListBox as TObject) is TCHeckListBox then (aListBox as TCheckListbox).Items.Clear;
UI(TListBoxとTChechecklist Box)の両方でより効率的に動作するコードを記述できるのではないかと思います