Skip to content

Commit d21564c

Browse files
authored
Add formatting for CA2247 example (#49088)
1 parent a5e2288 commit d21564c

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ The TaskCompletionSource type has a constructor that accepts a <xref:System.Thre
3535
To fix the violation, replace the <xref:System.Threading.Tasks.TaskContinuationOptions?displayProperty=fullName> enum value with the corresponding <xref:System.Threading.Tasks.TaskCreationOptions?displayProperty=fullName> enum value.
3636

3737
```csharp
38-
// Violation
39-
var tcs = new TaskCompletionSource<int>(TaskContinuationOptions.RunContinuationsAsynchronously);
38+
// Violation
39+
var tcs = new TaskCompletionSource<int>(TaskContinuationOptions.RunContinuationsAsynchronously);
4040

41-
// Fixed
42-
var tcs = new TaskCompletionSource<int>(TaskCreationOptions.RunContinuationsAsynchronously);
41+
// Fixed
42+
var tcs = new TaskCompletionSource<int>(TaskCreationOptions.RunContinuationsAsynchronously);
4343
```
4444

4545
## When to suppress warnings

0 commit comments

Comments
 (0)