I\'ve seen many people use the following code:
Type t = typeof(obj1); if (t == typeof(int)) // Some code here
But I know you could also
if (c is UserControl) c.Enabled = enable;