3 ms·
Sorry, but since C# 2.0 we could just write "new Thread(DoStruff)" or "SomeDelegate del = SomeMethod".
by jeffz 15y ago
Sorry, but since C# 2.0 we could just write "new Thread(DoStruff)" or "SomeDelegate del = SomeMethod".
- politician 15y agoI can't resist, so, public static class ActionExtensions { public static void InvokeAsync(this Action<object> target, object context) { new Thread(obj => target(obj)).Start(context); } } ((Action<object>) (Console.WriteLine)).InvokeAsync("Hello, World");