Monthly Archives: August 2012

“Until” extension method for integers in C#

I wrote this simple snippet today, and thought I’d share: public static IEnumerable<int> Until(this int from, int to) { for (int i = from; i <= to; i++) { yield return i; } } Its purpose is to return number … Continue reading

Posted in C# | Tagged , | Leave a comment