DateTimeExtensionsBetween Method (DateTime, NullableDateTime, NullableDateTime) |
Determines whether or not a
DateTime value is between to specified
DateTime boundaries.
Namespace:
Enkoni.Framework
Assembly:
Enkoni.Framework (in Enkoni.Framework.dll) Version: 1.3.0.1
Syntaxpublic static bool Between(
this DateTime source,
Nullable<DateTime> lowerLimit,
Nullable<DateTime> upperLimit
)
<ExtensionAttribute>
Public Shared Function Between (
source As DateTime,
lowerLimit As Nullable(Of DateTime),
upperLimit As Nullable(Of DateTime)
) As Boolean
public:
[ExtensionAttribute]
static bool Between(
DateTime source,
Nullable<DateTime> lowerLimit,
Nullable<DateTime> upperLimit
)
[<ExtensionAttribute>]
static member Between :
source : DateTime *
lowerLimit : Nullable<DateTime> *
upperLimit : Nullable<DateTime> -> bool
Parameters
- source
- Type: SystemDateTime
The date time that must be tested. - lowerLimit
- Type: SystemNullableDateTime
The lower bound (exclusive) of the equation. - upperLimit
- Type: SystemNullableDateTime
The upper bound (exclusive) of the equation.
Return Value
Type:
Boolean if
source is greater than
lowerLimit and smaller than
upperLimit;
otherwise,
.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
DateTime. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also