From ff47644835e2ad70f144b68761c0bd88d9ba3a17 Mon Sep 17 00:00:00 2001 From: kurnakovv Date: Tue, 7 Oct 2025 21:40:20 +0900 Subject: [PATCH] Fix formatting and add method signature for CA5372 rule --- docs/fundamentals/code-analysis/quality-rules/ca5372.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); } ```