ReasonCodeExample.XPathInformation.Writers.XmlStructureWriter.RemoveComments C# (CSharp) Method

RemoveComments() private method

private RemoveComments ( System.Xml.Linq.XDocument document ) : void
document System.Xml.Linq.XDocument
return void
        private void RemoveComments(XDocument document)
        {
            var comments = document.DescendantNodes().OfType<XComment>().ToArray();
            foreach(var comment in comments)
            {
                comment.Remove();
            }
        }