The AdInfinitum extension method in type long. | Lecture 16 - slide 11 : 11 Program 3 |
using System; using System.Collections.Generic; static public class LongExtension{ public static IEnumerable<long> AdInfinitum(this long from){ for (long i = from; true; i++) yield return i; } } |