DateTimeExtensionsIsBetween Method |
Determines whether a
DateTime is between two other nullable
DateTimes.
When from and/or to are null, they are not checked.
Namespace:
Aloe.EnterpriseOne.Model.Core.Util
Assembly:
Aloe.EnterpriseOne.Model (in Aloe.EnterpriseOne.Model.dll) Version: 20.1.3.5
Syntaxpublic static bool IsBetween(
this DateTime checkedDate,
Nullable<DateTime> from,
Nullable<DateTime> to
)
<ExtensionAttribute>
Public Shared Function IsBetween (
checkedDate As DateTime,
from As Nullable(Of DateTime),
to As Nullable(Of DateTime)
) As Boolean
public:
[ExtensionAttribute]
static bool IsBetween(
DateTime^ checkedDate,
Nullable<DateTime^>^ from,
Nullable<DateTime^>^ to
)
[<ExtensionAttribute>]
static member IsBetween :
checkedDate : DateTime *
from : Nullable<DateTime> *
to : Nullable<DateTime> -> bool
Parameters
- checkedDate
- Type: SystemDateTime
The checked date. - from
- Type: SystemNullableDateTime
From date and time. Null means to not check it. - to
- Type: SystemNullableDateTime
To date and time. Null means to not check it.
Return Value
Type:
BooleanBoolean indicating whether the date is between the specified from and to dates.
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