本文整理汇总了C#中Date.IsBetween方法的典型用法代码示例。如果您正苦于以下问题:C# Date.IsBetween方法的具体用法?C# Date.IsBetween怎么用?C# Date.IsBetween使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Date
的用法示例。
在下文中一共展示了Date.IsBetween方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CanDetermineDateInBetween_Before
public void CanDetermineDateInBetween_Before()
{
Date testDate = new Date(2000, 1, 1);
Date startDate = new Date(2000, 1, 2);
Date endDate = new Date(2000, 1, 3);
bool between = testDate.IsBetween(startDate, endDate);
Assert.False(between);
}
示例2: CanDetermineDateInBetween_ExclusiveAfter
public void CanDetermineDateInBetween_ExclusiveAfter()
{
Date startDate = new Date(2000, 1, 1);
Date endDate = new Date(2000, 1, 2);
Date testDate = new Date(2000, 1, 2);
bool between = testDate.IsBetween(startDate, endDate, true);
Assert.False(between);
}
示例3: CanDetermineDateInBetween_Start
public void CanDetermineDateInBetween_Start()
{
Date startDate = new Date(2000, 1, 1);
Date testDate = new Date(2000, 1, 1);
Date endDate = new Date(2000, 1, 2);
bool between = testDate.IsBetween(startDate, endDate);
Assert.True(between);
}