Code Snippet: Determining how two intervals overlap
The following pieces of code help you figure out how two intervals overlap, and provides tools to represent them in a way that is useful for debugging purposes. This job is quite easy to accomplish, but since it is written too frequently each time from scratch, I have put them in this gist.
IntervalOverlapKinds.cs file defines the
IntervalOverlapKinds enumeration. The interval detection is carried out in the static methods of the