Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/fundamentals/code-analysis/quality-rules/ca2247.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ The TaskCompletionSource type has a constructor that accepts a <xref:System.Thre
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.

```csharp
// Violation
var tcs = new TaskCompletionSource<int>(TaskContinuationOptions.RunContinuationsAsynchronously);
// Violation
var tcs = new TaskCompletionSource<int>(TaskContinuationOptions.RunContinuationsAsynchronously);

// Fixed
var tcs = new TaskCompletionSource<int>(TaskCreationOptions.RunContinuationsAsynchronously);
// Fixed
var tcs = new TaskCompletionSource<int>(TaskCreationOptions.RunContinuationsAsynchronously);
```

## When to suppress warnings
Expand Down