It's something that is completely unintuitive because MS wants you to use as much async as possible, provides an async API but is not fixing the damn issue for years. Most senior devs will not know about this, use the methods and probably won't even notice it in most production scenarios. At least not until it's hits them like a ton of bricks.
Another favorite .NET tidbit of mine is the existence of Microsoft.VisualStudio.Threading. If you use a lot of async code with UI you will eventually run into deadlocks. MS noticed that, too, and wrote this library for Visual Studio (hence the name) to work around that and then released it to the public.
Also fun (but understandable why they don't fix it) BUT with VS2019 they included a new "code fix"/analyzer that very annoyingly tells you to convert the latter into the former for "code readability", making you code slower.
Don't get me wrong, I like .NET a lot but it has quite a few footguns.
It's something that is completely unintuitive because MS wants you to use as much async as possible, provides an async API but is not fixing the damn issue for years. Most senior devs will not know about this, use the methods and probably won't even notice it in most production scenarios. At least not until it's hits them like a ton of bricks.
Another favorite .NET tidbit of mine is the existence of Microsoft.VisualStudio.Threading. If you use a lot of async code with UI you will eventually run into deadlocks. MS noticed that, too, and wrote this library for Visual Studio (hence the name) to work around that and then released it to the public.
Or:
Also fun (but understandable why they don't fix it) BUT with VS2019 they included a new "code fix"/analyzer that very annoyingly tells you to convert the latter into the former for "code readability", making you code slower.Don't get me wrong, I like .NET a lot but it has quite a few footguns.