Skip to content

Instantly share code, notes, and snippets.

@wheeliechamp
Last active June 2, 2016 15:09
Show Gist options
  • Save wheeliechamp/62a497ded197eb8b074a0b1d8bedb33e to your computer and use it in GitHub Desktop.
Save wheeliechamp/62a497ded197eb8b074a0b1d8bedb33e to your computer and use it in GitHub Desktop.
using System;
using System.Linq;
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
IEnumerable<int> counter = Enumerable.Range(0, 10);
var linqWhere = counter.Where(item => item > 3 && item < 8);
foreach(int i in linqWhere)
Console.Write(i);
Console.WriteLine("");
var linqWhere2 = counter.Where(item => item > 3).Where(item => item < 8);
foreach(int i in linqWhere2)
Console.Write(i);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment