hi
protected void testSwitch( object myObject){if (myObject.GetType() == typeof(Button)){Button btnMyObj = (Button)myObject;btnMyObj.Visible = true;}
switch (myObject){case myObject.GetType() == typeof(Button):
//...break;
default://...break;}
}