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