Skip to content

Commit a536a5e

Browse files
gewarrenBillWagner
andauthored
Update docs/fundamentals/code-analysis/quality-rules/ca2264.md
Co-authored-by: Bill Wagner <[email protected]>
1 parent fa93ace commit a536a5e

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ When a value that's known to never be null is passed to `ArgumentNullException.T
2626

2727
## Rule description
2828

29-
`ArgumentNullException.ThrowIfNull` throws when the passed argument is `null`. Certain constructs like non-nullable structs (except for <xref:System.Nullable%601>), 'nameof()' expressions, and 'new' expressions are known to never be null, so `ArgumentNullException.ThrowIfNull` will never throw.
29+
`ArgumentNullException.ThrowIfNull` throws when the passed argument is `null`. Certain constructs like non-nullable structs (except for <xref:System.Nullable%601>), type parameters known to be non-nullable structs, 'nameof()' expressions, and 'new' expressions are known to never be null, so `ArgumentNullException.ThrowIfNull` will never throw.
3030

3131
In the case of a struct, since `ArgumentNullException.ThrowIfNull` accepts an `object?`, the struct is boxed, which causes an additional performance penalty.
3232

0 commit comments

Comments
 (0)