Skip to content

Instantly share code, notes, and snippets.

View JasonKStevens's full-sized avatar

Jason Stevens JasonKStevens

  • PuzzleBox Software
  • Auckland New Zealand
View GitHub Profile
public class Example2
{
public static void Run()
{
IEnumerable<string> list = CalcResults().Take(2);
foreach (string result in list)
{
Console.Out.WriteLine(result);
}
IEnumerable<int> list3 = AllWholeNumbers().Take(10);
IEnumerable<int> list4 = AllWholeNumbers().Skip(100).Where(n => n % 2 == 0).Take(10);
...
public class Example1
{
public static void Run()
{
IEnumerable<int> list = AllWholeNumbers();
foreach (int result in list)
{
Console.Out.WriteLine(result);
}