dotnet/runtime

Prefer ValueTuple over Tuple

Open

#33.791 aperta il 19 mar 2020

Vedi su GitHub
 (7 commenti) (0 reazioni) (0 assegnatari)C# (5445 fork)batch import
api-approvedarea-System.Runtimecode-analyzercode-fixerhelp wantedpartner-impact

Metriche repository

Star
 (17.886 star)
Metriche merge PR
 (Merge medio 12g 11h) (661 PR mergiate in 30 g)

Descrizione

The rule should find and flag cases where a Tuple<...> is being used but where a ValueTuple<...> would suffice, ideally with the C# language syntax employed. There are some cases where a Tuple<...> is beneficial, however, so the patterns identified here would be constrained.

Category: Performance Severity: Info

Guida contributor