diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5372.md b/docs/fundamentals/code-analysis/quality-rules/ca5372.md index 8f370f0d98c17..e247b7387fc95 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5372.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5372.md @@ -65,7 +65,10 @@ The type of the first parameter of `XPathDocument` is not `XmlReader`. using System.IO; using System.Xml.XPath; ... -var obj = new XPathDocument(stream); +public void TestMethod(Stream stream) +{ + var obj = new XPathDocument(stream); +} ``` ### Solution @@ -76,6 +79,6 @@ using System.Xml.XPath; ... public void TestMethod(XmlReader reader) { -var obj = new XPathDocument(reader); + var obj = new XPathDocument(reader); } ```