File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,10 @@ should always be created using the syntax `default(T)` instead.
4545
4646To fix a violation of this rule, replace the syntax ` new T() ` with the equivalent syntax ` default(T) ` .
4747
48- For native-sized integers, the code fix will use ` IntPtr.Zero ` /` UIntPtr.Zero ` when the project targets C# 11 with
49- runtime support for native-sized integers (e.g. .NET 7 or later), and ` default(nint) ` /` default(nuint) ` otherwise.
48+ For native-sized integers constructed with ` new nint() ` /` new nuint() ` , the code fix will only use
49+ ` IntPtr.Zero ` /` UIntPtr.Zero ` in projects where this has the same meaning, specifically, C# 11 with
50+ runtime support for native-sized integers (e.g. .NET 7 or later). Otherwise, the code fix will use
51+ ` default(nint) ` /` default(nuint) ` to ensure identical behavior to the original code.
5052
5153## How to suppress violations
5254
You can’t perform that action at this time.
0 commit comments