Vagif Abilov's blog on .NET


Browse by Tags

All Tags » yield (RSS)
Using “yield” to enumerate endless sequence
Craig Andera in his blog post showed yet another Fibonacci algorithm, this one with “yeild” operator. private IEnumerable Fibonacci() { yield return 0; yield return 1; int a = 0; int b = 1; while (true) { int temp = a + b; a = b; b = temp; yield return...
Posted: Thu, Mar 11 2010 10:41 AM by Vagif Abilov | with no comments
Filed under: ,