And, as always, thanks for sharing.
/cc: @davidfowl.com, @scott.hanselman.com, @migueldeicaza.bsky.social
@steplyakov.bsky.social
Software Engineer at MSFT. Opinions are my own.
And, as always, thanks for sharing.
/cc: @davidfowl.com, @scott.hanselman.com, @migueldeicaza.bsky.social
I've seen cases when the application code was filled with it "to improve performance" or "to avoid deadlocks". And it was very hard to convince that this is not how ConfigureAwait should be used.
In this video I'm covering why we have ConfigureAwait in the first place and how to use it correctly.
Another video on Dissecting the Code YouTube channel: "ConfigureAwait best practices".
I feel we have a cargo cult on using ConfigureAwait without thinking too much.
youtu.be/bUHQeY-DlBc?...
Do you know that just changing the C# langversion might affect performance?
The code generation for method group conversion has changed in C# 11 to avoid allocations in certain cases.
And, as always, I would really appreciate the repost!
/cc: @kirillosenkov.com, @davidfowl.com, @jaredpar.bsky.social, @migueldeicaza.bsky.social, @scott.hanselman.com, @damianedwards.com
Link to the video: youtu.be/Ysg85IR6rMc?...
20.01.2026 16:16 β π 2 π 0 π¬ 1 π 0New video on Dissecting the Code YouTube channel: ".NET 10 De-Abstraction in Action", that covers how .NET 10 almost completely eliminates the abstraction penalty when iterating over interfaces.
#dotnet10, #performance
And big thanks to Egor from the JIT team for showing his awesome bot!
08.01.2026 14:26 β π 1 π 0 π¬ 0 π 0Here is a link to my PR: github.com/dotnet/runti...
And once this is merged we should have way fewer allocations when using LazyInitializer.EnusreInitialized by stack-allocating a delegate passed as Func<T>
TIL that dotnet/runtime github repo has an awesome bot for running the benchmarks to compare the before and after!
Here is an example:
Ah! I get the issue. The clients wonβt be able to use the lib if it has extension members! Sigh!
08.01.2026 14:08 β π 0 π 0 π¬ 0 π 0Iβm curious whatβs the issue with manually specifying lang version as 14 when targeting older frameworks? I constantly relying on this even using latest C# when targeting Full Framework (yes some features wonβt work, but the vast majority will work).
08.01.2026 14:01 β π 0 π 0 π¬ 1 π 0Do you know that .NET 10 massively reduces the overhead of using any built-in collections via interfaces (yes, not only for arrays)?
Iterating a list via IList<T>, or dictionary via 'IDictionary<K,V>', etc., now has almost zero abstraction penalty!
I'm writing another book, and the first few chapters are available through Manning Early Access now! For 50% off!
hubs.la/Q03Q9PGP0
More details, and the story of how I came to write it, are on my blog at
ericlippert.com/2025/10/30/i...
It feels great to be writing again after a long break. :)
Yep. But this is something that I've figured out just earlier today.
Was hoping for something in .editorconfig: `dotnet_diagnostics.category-Compiler.severity = error'. But I don't think that's available.
The point is that its a roundabout way to achieving this. And not easy to find.
its a bit too much :). I would definitely prefer one liner.
My option is two liners which is ok, but requires directory.build.props. I'm surprised that it's seems impossible to do that in one line in .editorconfig.
Correction: I want to keep static analysis warnings as warnings.
23.10.2025 13:44 β π 0 π 0 π¬ 1 π 0I want to fail the build on compiler warnings, but keep the diagnostics warnings as warnings.
One option that I've found is to set 'TreatWarningsAsErrors' to true, and set 'CodeAnalysisTreatWarningsAsErrors' to false.
Is there a better way?
/cc: @jaredpar.bsky.social, @terrajobst.net
New blog post:
In 2021 I found an invisible memory leak in a tool (VS Code) that I have never used. Impossible? Easy:
randomascii.wordpress.com/2025/10/09/f...
As always, I'll appreciate the feedback and I would love if you share the video with your network! It means a lot to me!
/cc: @visualstudio.com, @migueldeicaza.bsky.social, @rephuffman.bsky.social, @scott.hanselman.com, @davidfowl.com
New video on Dissecting the Code YouTube Channel.
This time, it's about Parallel Stacks - my very favorite
@visualstudio.com
feature that you probably are not using enough!
I can't even count how many times it helped me production incidents investigations!
youtu.be/Z5mN0VCB-KA?...
And if by any chance you haven't subscribed yet, here is the link to the channel ;)
www.youtube.com/@DissectingT...
Hey #dotnet people. First milestone for Dissecting the Code YouTube channel - 1k subscribers!
Thanks a lot everyone for your support and warm feedback that I'm getting!
Oh! They use a custom taskscheduler for that. Interesting!
02.10.2025 21:14 β π 1 π 0 π¬ 1 π 0/cc: @migueldeicaza.bsky.social, @terrajobst.net, @scott.hanselman.com, @visualstudio.com, @damianedwards.com and other. I would really appreciate if you'll share the link!
02.10.2025 18:40 β π 0 π 0 π¬ 0 π 0After a short break I'm back with the new video on Dissecting the Code YouTube channel.
This time its all about ConfigureAwait, why we ended up having it and how it works under the hood!
#dotnet folks, please share! I'll really appreciate it!
youtu.be/RZsLA_R8i9s?...
Egor landed yesterday a great document about C# "Unsafe code best practices" https://github.com/dotnet/docs/blob/main/docs/standard/unsafe-code/best-practices.md π
Even if you think you know them, it is a good read as a reminder! π
#dotnet #csharp
Hey #dotnet folks! Please share latest deep-dive video to spread the knowledge about async internals and tips&tricks on debugging .NET code!
Your support means the world!
/cc: @scott.hanselman.com, @ardalis.com, @terrajobst.net, @migueldeicaza.bsky.social and every other member of .net community!
Hey guys.
Async methods might be scary for some, but they're not that complicated if you can debug the async machinery to understand how they work!
This is exactly what I did in the last video - "Let's debug async/await in C#".
youtu.be/oHKyzgGjKHQ?...
Hey #dotnet community! Please share and let's simplify the way we deal with resources in .NET!
/cc: @migueldeicaza.bsky.social, @scott.hanselman.com and other folks, I love to discuss this topic!
You might disagree with my take! But its time to reconsider some old patterns.