private static Exception InvalidAttributeUseException(Type type) { return new InvalidOperationException(SR.Format(SR.XmlInvalidAttributeUse, type.FullName)); }