4 ms·
In C# it is very simple to implement a generator using the 'yield return' and 'yield break' statements. Also LINQ is based on generators, allowing you to write
by fjfaase 5y ago
In C# it is very simple to implement a generator using the 'yield return' and 'yield break' statements. Also LINQ is based on generators, allowing you to write rather complex queries with relatively compact code.