private void ThrowException (string text, XmlReader reader) { IXmlLineInfo li = reader as IXmlLineInfo; throw new ConfigurationException (text, streamName, li != null ? li.LineNumber : 0); } }