hi guys! i have a method that has one parameter of type object(Pls see the code below) and I know that only objects of a Textbox, Combox, and Listbox are the posible value that i will pass to that parameter. My question is how will i check if the object is Textbox, ComboBox or ListBox. By the way, What im trying to do is to set tha background color of the object that calls the method.
Code:public static void SetCntrlBackColrEnter(object arg) { //arg.BackColor = Color.Lavender; //arg.ForeColor = Color.Black; }




Reply With Quote