private static bool IsComVisible(PropertyInfo propertyInfo) { var customAttributesOnProperty = propertyInfo.GetCustomAttributes(typeof (ComVisibleAttribute), true); foreach (ComVisibleAttribute attr in customAttributesOnProperty) { if (!attr.Value) { return false; } } return true; }