I have this code and need to make sure that all result variables are equal?
long result1 = timer.CalculateElapsedTimeInMinutes();
long result2 = timer.CalculateElapsedTimeInMinutes();
long result3 = timer.CalculateElapsedTimeInMinutes();
long result4 = timer.CalculateElapsedTimeInMinutes();
long result5 = timer.CalculateElapsedTimeInMinutes();
This is what I did, but I feel like it can be done in a simpler way, maybe not?
bool allEqual = (result1 == result2) && (result3 == result4) && (result1 == result3) && (result1 == result5);
Thanks.