News for hackers. Stuff that matters.
Re:Asynchronous Programming in C# by Hawxy on Tuesday April 30, 2024 @08:39AM (#40210393)
Sure, you can use it like that, but it's not considered good practice. I think the context missing here is that most modern C# applications are going to be async all of the way down. The entry point can be async. Background service abstractions are async. Your API endpoints in ASP.NET Core are typically async as you're going to be calling some async I/O anyways (database queries, HTTP clients). There's no benefit to writing something in the old callback model when the rest of your code is async/await anyways.

There are no comments on this comment yet.