コード例 #1
0
        public List <Point2D> GetPointsInExtents(Extent2D extents)
        {
            var xs = XS.Where(x => x >= extents.min.x && x <= extents.max.x).ToList();
            var ys = YS.Where(y => y >= extents.min.y && y <= extents.max.y).ToList();

            return(BuildGrid(xs, ys));
        }
コード例 #2
0
    public void M3()
    {
        var i  = I;
        var t1 = from x in XS
                 from y in XS // anonymous type
                 from z in XS // anonymous type
                 where x > 0
                 select x + z;
        var t2 = from x in XS
                 from y in YS.Concat(t1)
                 select x into y
                 select y + i;
        var t3 = from x in XS
                 group x by x / 10 + i;
        var t4 = from x in XS
                 group x + i by x / 10;
        var t5 = from x in XS
                 group x by x / 10 into g
                 select g.Key + i;
        var t6 = from x in XS
                 join y in YS on x + i equals y + i
                 select x + y + i;
        var t7 = from x in XS
                 join y in YS on x + i equals y
                 into z select x;

        var t8 = from x in XS select(
            from y in YS select y);

        var t9 = from x in XS select(
            from y in YS.Concat(t7)
            select y + x + 123);
    }