Correct way to check value tuples for equality in C#?

Viewed 2129

Given two variables of type (int, int), how do I check if they represent equal values?

For example:

var a = (1, 2);
var b = (1, 2);

var c = a == b; // Error CS0019 Operator '==' cannot be applied to operands
                // of type '(int, int)' and '(int, int)'

How is this comparison meant to be done in C# 7? Should I use .Equals instead or do it some other way?

1 Answers
Related