private void VerifyWhitespace(string s) { for (int i = 0; i < s.Length; i++) if (!IsWhitespace(s[i])) throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(SR.XmlIllegalOutsideRoot))); }