Skip to content

Commit 994cc36

Browse files
authored
Fix formatting and add method signature for CA5372 rule (#48940)
1 parent fef9c82 commit 994cc36

File tree

1 file changed

+5
-2
lines changed
  • docs/fundamentals/code-analysis/quality-rules

1 file changed

+5
-2
lines changed

docs/fundamentals/code-analysis/quality-rules/ca5372.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ The type of the first parameter of `XPathDocument` is not `XmlReader`.
6565
using System.IO;
6666
using System.Xml.XPath;
6767
...
68-
var obj = new XPathDocument(stream);
68+
public void TestMethod(Stream stream)
69+
{
70+
var obj = new XPathDocument(stream);
71+
}
6972
```
7073

7174
### Solution
@@ -76,6 +79,6 @@ using System.Xml.XPath;
7679
...
7780
public void TestMethod(XmlReader reader)
7881
{
79-
var obj = new XPathDocument(reader);
82+
var obj = new XPathDocument(reader);
8083
}
8184
```

0 commit comments

Comments
 (0)