C# Digest #433: Serializing asynchronous operations in C#
#433 — September 19, 2022 | View in browser |
C# Digest
Spread the word, build the community, share the knowledge with your friends.
sponsor
Blazor Best Practices: Handling Errors
Errors are likely to occur, the question is how to handle them. Let’s take a look at best practices in handling them in your Blazor app.
this week's favorite
Serializing asynchronous operations in C#
A serialization pattern for asynchronous operations is making sure only one operation is active at a time, usually because the operation is itself internally stateful, and you don’t want multiple operations trying to mutate the state at the same time.
.NET One-line Scoped Initializers with Dependency Injection
As I work more consistently with the top-level style of .NET and ASP.NET Core applications, I find myself needing to do more start-up operations that have to occur before my application starts. Typically, in an ASP.NET Core application, the server is ready to begin accepting requests after a call to app.Run method or one of its variants.
A Guide to Building a .NET 6.0-Based C# Scripting Engine for Games
Welcome to the first in a series of blog posts detailing how to integrate .NET 6.0 C# scripting support into a C++ Windows game engine. Most of what I am going to detail is based on my research and work in developing a C# scripting system for my DigiPen game projects and is most likely not perfect, but I can guarantee the solution works.
If you ever deal with legacy code, it is worth understanding what happens here in a bit more detail. A few years ago, discards were not a thing in C#, but recent versions have gradually been adding more support for them. This history means that not everything is as it seems, and it can be useful to know that, because it can explain some strange-looking practices in older code.
Beware of records, with expressions and calculated properties
Given their terseness, even ignoring the other records characteristics, as soon as I’m creating a type that I’m expecting to be immutable, I immediately start with a record. However this might not always be adequate, and in this post we’ll look at a very specific example where I introduced a bug in the code due to not taking into consideration all of the records characteristics.
courses
Free Learnk8s Training Series: Scaling Apps, Nodes, and Clusters
Learnk8s is back with a new virtual lab series. Supported by documentation, scripts, code examples, and a hands-on demo, you’ll deploy and scale an application using the Linode Kubenetes Engine to create clusters. Registration is free and all 3 sessions are open now. Reserve your seat today!
how did you like this issue?
1 = didn't like it at all and 5 = loved it and shared it with everyone I know
newsletters

Older messages
C# Digest #432: A comprehensive design patterns library
Monday, September 12, 2022
And more news, tutorials and articles about C# and .NET in this week's issue. #432 — September 12, 2022 View in browser C# Digest Spread the word, build the community, share the knowledge with your
C# Digest #431: Performance Improvements in .NET 7
Sunday, September 4, 2022
And more news, tutorials and articles about C# and .NET in this week's issue. #431 — September 05, 2022 View in browser C# Digest Spread the word, build the community, share the knowledge with your
C# Digest #430: History of Microsoft Azure
Sunday, August 28, 2022
And more news, tutorials and articles about C# and .NET in this week's issue. #430 — August 29, 2022 View in browser C# Digest Spread the word, build the community, share the knowledge with your
C# Digest #429: New in Entity Framework 7: Bulk Operations with ExecuteDelete and ExecuteUpdate
Monday, August 22, 2022
And more news, tutorials and articles about C# and .NET in this week's issue. #429 — August 22, 2022 View in browser C# Digest Spread the word, build the community, share the knowledge with your
C# Digest #428: A .NET distributed cache with a ~25 nanosecond read time!
Sunday, August 14, 2022
And more news, tutorials and articles about C# and .NET in this week's issue. #428 — August 15, 2022 View in browser C# Digest Spread the word, build the community, share the knowledge with your
You Might Also Like
Import AI 399: 1,000 samples to make a reasoning model; DeepSeek proliferation; Apple's self-driving car simulator
Friday, February 14, 2025
What came before the golem? ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
Defining Your Paranoia Level: Navigating Change Without the Overkill
Friday, February 14, 2025
We've all been there: trying to learn something new, only to find our old habits holding us back. We discussed today how our gut feelings about solving problems can sometimes be our own worst enemy
5 ways AI can help with taxes 🪄
Friday, February 14, 2025
Remotely control an iPhone; 💸 50+ early Presidents' Day deals -- ZDNET ZDNET Tech Today - US February 10, 2025 5 ways AI can help you with your taxes (and what not to use it for) 5 ways AI can help
Recurring Automations + Secret Updates
Friday, February 14, 2025
Smarter automations, better templates, and hidden updates to explore 👀 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
The First Provable AI-Proof Game: Introducing Butterfly Wings 4
Friday, February 14, 2025
Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? undefined The Market Today #01 Instagram (Meta) 714.52 -0.32%
GCP Newsletter #437
Friday, February 14, 2025
Welcome to issue #437 February 10th, 2025 News BigQuery Cloud Marketplace Official Blog Partners BigQuery datasets now available on Google Cloud Marketplace - Google Cloud Marketplace now offers
Charted | The 1%'s Share of U.S. Wealth Over Time (1989-2024) 💰
Friday, February 14, 2025
Discover how the share of US wealth held by the top 1% has evolved from 1989 to 2024 in this infographic. View Online | Subscribe | Download Our App Download our app to see thousands of new charts from
The Great Social Media Diaspora & Tapestry is here
Friday, February 14, 2025
Apple introduces new app called 'Apple Invites', The Iconfactory launches Tapestry, beyond the traditional portfolio, and more in this week's issue of Creativerly. Creativerly The Great
Daily Coding Problem: Problem #1689 [Medium]
Friday, February 14, 2025
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. Given a linked list, sort it in O(n log n) time and constant space. For example,
📧 Stop Conflating CQRS and MediatR
Friday, February 14, 2025
Stop Conflating CQRS and MediatR Read on: my website / Read time: 4 minutes The .NET Weekly is brought to you by: Step right up to the Generative AI Use Cases Repository! See how MongoDB powers your