ArgumentNullException.ThrowIfNull prevents automatic exception documentation
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/ArgumentNullExceptionThrowIfNull-preven/10849843)._
---
[severity:It bothers me. A fix would be nice]
When using `ArgumentNullException.ThrowIfNull` instead of a normal throw statement, writing `///` no longer automatically documents `ArgumentNullException` as a possible exception thrown by the method:

-->

---
### Original Comments
#### Feedback Bot on 2/16/2025, 08:15 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Contributor guide
Research direction
The issue provides no Roslyn file, test, or entry point to follow. Start by reproducing the XML documentation completion behavior in Visual Studio with a method using ArgumentNullException.ThrowIfNull and compare it with an explicit throw statement. Done means the completion experience documents ArgumentNullException consistently for both forms, with regression coverage added in the relevant Roslyn tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100