Created
October 14, 2015 14:59
-
-
Save eldenis/bac4fbc80f581eb36781 to your computer and use it in GitHub Desktop.
Evilest C# Class Ever
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using static System.Console; | |
namespace ConsoleApplication2 | |
{ | |
class Program | |
{ | |
static string Str => $"This is the time: {DateTime.Now}"; | |
static async void Print(string str) => await Task.Run(() => WriteLine(str)); | |
static IEnumerable<string> Strings() | |
{ | |
yield return Str; | |
yield return nameof(Str); | |
} | |
static void Main(string[] args) | |
{ | |
foreach (var str in Strings()) | |
Print($"{str}"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why won't this class compile?