This is what I have:

Code:
if (sender is TextBox)
	(sender as TextBox).BackColor = Color.White;
else
	(sender as ListBox).BackColor = Color.White;
This is what I want:

Code:
System.Type t = (sender is TextBox) ? TextBox:ListBox;
(sender as t).BackColor = Color.White;
But that doesn't work. Any ideas?

Dan