This is what I have:
This is what I want:Code:if (sender is TextBox) (sender as TextBox).BackColor = Color.White; else (sender as ListBox).BackColor = Color.White;
But that doesn't work. Any ideas?Code:System.Type t = (sender is TextBox) ? TextBox:ListBox; (sender as t).BackColor = Color.White;
Dan




Reply With Quote