public void CheckForInheritsFrom([InheritsFrom(typeof(ArgumentException))]object myObject) { // Argument.InheritsFrom("myObject", myObject, typeof(ArgumentException)); }