private void CheckProhibitedFlag(XmlSchemaFacet facet, RestrictionFlags flag, string errorCode) { if ((validRestrictionFlags & flag) == 0) { throw new XmlSchemaException(errorCode, datatype.TypeCodeString, facet); } }