Skip to content

Instantly share code, notes, and snippets.

@lcaballero
Created March 5, 2013 23:54
Show Gist options
  • Save lcaballero/5095517 to your computer and use it in GitHub Desktop.
Save lcaballero/5095517 to your computer and use it in GitHub Desktop.
Typical .To(a,b) for Linq.
public static IEnumerable<int> To(this int from, int to)
{
for (int i = from; i < to; i++)
{
yield return i;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment