| TypeName | SA1141UseTupleSyntax |
| CheckId | SA1141 |
| Category | Readability Rules |
📝 This rule is new for StyleCop Analyzers, and was not present in StyleCop Classic. 📝 This rule is only active for C# 7.0 and higher
A ValueTuple type declaration was used instead of the preferred tuple language construct.
A ValueTuple type declaration was used instead of the preferred tuple language construct. See the documentation on tuple types for information on how to work with tuples in C# 7.
For example, the following code would produce a violation of this rule:
ValueTuple<int, int> x; // SA1141The following code would not produce any violations:
(int, int) x;To fix a violation of this rule, use the appropriate tuple type in code instead of the ValueTuple type.
[SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1141:UseTupleSyntax", Justification = "Reviewed.")]#pragma warning disable SA1141 // Use tuple syntax
#pragma warning restore SA1141 // Use tuple syntax