Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit focus mode

CA1842: Do not use 'WhenAll' with a single task

  • 2023-12-16
Feedback

In this article

PropertyValue
Rule IDCA1842
TitleDo not use 'WhenAll' with a single task
CategoryPerformance
Fix is breaking or non-breakingNon-breaking
Enabled by default in .NET 9As suggestion

Cause

WhenAll is called with a single task.

Rule description

UsingWhenAll with a single task may result in performance loss.

How to fix violations

You should await or return the task instead.

When to suppress warnings

Do not suppress a warning from this rule.

See also

Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, seeour contributor guide.

Feedback

Was this page helpful?

YesNo

In this article

Was this page helpful?

YesNo