gergyassura
New Member
I Have a Tuple list and I want to find overlaps:\[code\]static bool Overlap(params Tuple<int, int>[] ranges) { for (int i = 0; i < ranges.Length; i++) { if (i + 1 < ranges.Length) { if (!(ranges.Item1 < ranges.Item2 && ranges[i + 1].Item1 > ranges.Item2)) { return true; } } } return false;}\[/code\]How can I transform this into linq?How can I find if exists gaps with linq, too?