Fix code example for CA5362 - #55181
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the CA5362 documentation’s solution example so it no longer applies [NonSerialized] to an invalid target (a property), addressing #55114.
Changes:
- Added a new C# snippet file for the CA5362 solution example.
- Updated
ca5362.mdto correct the pseudo-code example, improve wording/formatting, and reference the external snippet via:::code. - Updated
ms.dateto reflect the edit date.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/fundamentals/code-analysis/quality-rules/snippets/csharp/all-rules/ca5362.cs | Adds the solution snippet, but needs snippet marker/id alignment to ensure extraction works. |
| docs/fundamentals/code-analysis/quality-rules/ca5362.md | Updates the article’s examples and replaces inline solution code with a :::code include. |
gewarren
enabled auto-merge (squash)
July 29, 2026 16:13
wadepickett
reviewed
Jul 29, 2026
wadepickett
reviewed
Jul 29, 2026
wadepickett
reviewed
Jul 29, 2026
wadepickett
reviewed
Jul 29, 2026
Contributor
There was a problem hiding this comment.
@gewarren: Some minor suggestions to review that I noted inline.
Co-authored-by: Wade Pickett <wpickett@microsoft.com>
wadepickett
approved these changes
Jul 30, 2026
wadepickett
left a comment
Contributor
There was a problem hiding this comment.
Approved, great work!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #55114.
Internal previews