Version

IntersectsWith(DateTime,DateTime,Boolean) Method

Returns a boolean value indicating whether the specified range intersects with any part of this range.
Syntax
public bool IntersectsWith( 
   DateTime start,
   DateTime end,
   bool isEndExclusive
)

Parameters

start
The earliest date/time of the range to test.
end
The latest date/time of the range to test.
isEndExclusive
Boolean value indicating the manner in which the value of the start parameter is compared to the value of the End property. When true is specified, this method returns false if the value of the start parameter is exactly equal to the value of this instance's End property, thereby excluding the moment in time which coincides exactly with the end of this range. This parameter defaults to true.
Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also