Skip to content

Instantly share code, notes, and snippets.

@sinuj31
sinuj31 / Yield.cs
Created November 19, 2014 05:22 — forked from TryJSIL/Yield.cs
Generators
using System;
using System.Collections;
using System.Collections.Generic;
public static class Program {
public static IEnumerable<int> OneToNine {
get {
for (int i = 0; i < 10; i++)
yield return i;
}