3 ms·
Actually for just that example you don't need any of it. new Thread(doStuff).Start();
by swax 15y ago
Actually for just that example you don't need any of it.
new Thread(doStuff).Start();
- MatthewPhillips 15y agonah, it would have to be new Thread(new ThreadStart(doStuff)).Start();
- jeffz 15y agoSorry, 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");