I am using .net core 3.1 / C# 8.0. I have two tuples where I expect to have equal values, however the runtime returns inequality. What is wrong with my expectation?
Tuple<decimal, double> firstTuple;
Tuple<decimal, double> secondTuple;
Testing with:
bool tuplesEqualInValue = (firstTuple == secondTuple);
The screenshot shows that the values of firstTuple
and secondTuple
hold the same values for each item. Yet the first test returns false
.
Documentation and other SO posts imply to me that the test should return true
:
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-7.3/tuple-equality