Created
March 5, 2013 23:54
-
-
Save lcaballero/5095517 to your computer and use it in GitHub Desktop.
Typical .To(a,b) for Linq.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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