Search notes:

C# yield

using System;
using System.Collections.Generic;

class Prg {

   static IEnumerable<string> words() {
      yield return "foo";
      yield return "bar";
      yield return "baz";
   }

   static void Main() {
      foreach (string word in words()) {
         Console.WriteLine(word);
      }
   }
}
Github repository about-C-Sharp, path: /language/keywords/contextual/yield/simple.cs

See also

System.Collections.IEnumerable, System.Collections.IEnumerator, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IEnumerator<T>
The foreach … in statement

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758200929, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/C-Sharp/language/keywords/contextual/yield/index(57): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78