当前位置: 首页>>代码示例>>C#>>正文


C# Range.Disjoint方法代码示例

本文整理汇总了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));
        }
开发者ID:aarondandy,项目名称:vertesaur,代码行数:23,代码来源:RangeFacts.cs

示例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));
        }
开发者ID:aarondandy,项目名称:vertesaur,代码行数:13,代码来源:RangeFacts.cs


注:本文中的Range.Disjoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。