BloggingAbout.NET
Thoughts of developers
Sign in
|
Join
|
Help
Home
Blogs
Media
All Tags
»
yield
(
RSS
)
Browse Blog Posts by Tags
Showing related tags and posts for the
Blogs
application. See
all tags in the site
C#
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 b; } } Now it's possible to fetch Fibonacci...
Posted to
Vagif Abilov's blog on .NET
by
Vagif Abilov
on Thu, Mar 11 2010
Filed under:
Filed under:
C#
,
yield
Page 1 of 1 (1 items)
Copyright © 2003-2010 BloggingAbout.NET