C# Digest - The "Weak Event" Pattern in C#
#470 – September 04, 2023 | View in browser |
C# Digest
The "Weak Event" Pattern in C#
Events in C# are a powerful mechanism for decoupling components and enabling a publisher/subscriber model. However, they have a significant drawback: the publisher holds a strong reference to the subscriber, and this can cause memory leaks. This article describes a pattern for implementing weak events in C#.
Workshop: How to migrate a legacy app to Blazor (sponsor)
Join Ed Charbeneau for a live application-building workshop, where you’ll migrate an existing .NET Web Forms application to Blazor in real time. Learn how to avoid potential roadblocks and master the basic concepts behind .NET 7 and Blazor.
Not all O(1) operations are considered equal
One of the most powerful optimization techniques is to use a cache, which is usually implemented as a dictionary. Today’s tale is about a dictionary, but surprisingly enough, not about a cache.
BearerToken: The new Authentication handler in .NET 8
In ASP.NET Core 8, Microsoft added a new authentication handler named BearerToken. In this blog post, I will explain how it works and its purpose. This handler is part of a bigger push by Microsoft to simplify authentication in ASP.NET Core, but in this blog post, we will focus on this handler.
Reasoning Task, Async & Await in .NET
As developers, we often encounter situations where we need to perform tasks concurrently to ensure our applications run efficiently. The asynchronous programming model in .NET brings us the powerful trio: Task, async, and await. In this post, we'll unravel the mysteries behind these concepts and explore how they enable parallel execution, providing a clear understanding of how they work together.
Measuring Unicode String Lengths with C#
In this short post, we’ll see how you can calculate the actual length of a string using the StringInfo class and why writing to the console might be one of the most complex technical challenges of our time. Well, maybe not, but it’s still damn hard.
"Parse, don't validate" and other type safety driven shenanigans
Making use of the type system is something I feel should be important when working in a strongly typed language like C#. However, I don't feel like that's the case, and I would love for the language to push folks in the direction of creating more robust programs, where the compiler provides more help in proving the correctness of the code.
Free up resources with cancellation while accessing APIs using HTTPClient
In this post I will teach how to free up resources with cancellation while accessing APIs using HTTP Client. All with live working demo.
how did you like this issue?
newsletters
Older messages
Struct memory layout optimizations
Sunday, August 27, 2023
We could store the exact same information in several ways, leading to space savings of 66% #469 – August 28, 2023 View in browser C# Digest Struct memory layout optimizations, practical considerations
Tales from the .NET Migration Trenches
Sunday, August 20, 2023
Messy aspects of migration that crop up when you've got an old codebase #468 – August 21, 2023 View in browser C# Digest Tales from the .NET Migration Trenches There are quite a few "how-to
.NET 8 Interceptors
Monday, August 14, 2023
Interceptors allow developers to target specific method invocations and intercept them with a new implementation #467 – August 14, 2023 View in browser C# Digest .NET 8 Interceptors As the name implies
How to benchmark different .NET versions
Sunday, August 6, 2023
With the famous BenchmarkDotNet library you can benchmark a lot #466 – August 07, 2023 View in browser C# Digest How to benchmark different .NET versions With the famous BenchmarkDotNet library you can
A Comprehensive Guide for Efficient Data Binding
Sunday, July 30, 2023
Basics of binding data to the Repeater, customizing the layout, and handling events #465 – July 31, 2023 View in browser C# Digest A Comprehensive Guide for Efficient Data Binding Learn how to use the
You Might Also Like
🔒 The Vault Newsletter: November issue 🔑
Monday, November 25, 2024
Get the latest business security news, updates, and advice from 1Password. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏
🧐 The Most Interesting Phones You Didn't See in 2024 — Making Reddit Faster on Older Devices
Monday, November 25, 2024
Also: Best Black Friday Deals So Far, and More! How-To Geek Logo November 25, 2024 Did You Know If you look closely over John Lennon's shoulder on the iconic cover of The Beatles Abbey Road album,
JSK Daily for Nov 25, 2024
Monday, November 25, 2024
JSK Daily for Nov 25, 2024 View this email in your browser A community curated daily e-mail of JavaScript news JavaScript Certification Black Friday Offer – Up to 54% Off! Certificates.dev, the trusted
Ranked | How Americans Rate Business Figures 📊
Monday, November 25, 2024
This graphic visualizes the results of a YouGov survey that asks Americans for their opinions on various business figures. View Online | Subscribe Presented by: Non-consensus strategies that go where
Spyglass Dispatch: Apple Throws Their Film to the Wolves • The AI Supercomputer Arms Race • Sony's Mobile Game • The EU Hunts Bluesky • Bluesky Hunts User Trust • 'Glicked' Pricked • One Massive iPad
Monday, November 25, 2024
Apple Throws Their Film to the Wolves • The AI Supercomputer Arms Race • Sony's Mobile Game • The EU Hunts Bluesky • Bluesky Hunts User Trust • 'Glicked' Pricked • One Massive iPad The
Daily Coding Problem: Problem #1619 [Hard]
Monday, November 25, 2024
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. Given two non-empty binary trees s and t , check whether tree t has exactly the
Unpacking “Craft” in the Software Interface & The Five Pillars of Creative Flow
Monday, November 25, 2024
Systems Over Substance, Anytype's autumn updates, Ghost's progress with its ActivityPub integration, and a lot more in this week's issue of Creativerly. Creativerly Unpacking “Craft” in the
What Investors Want From AI Startups in 2025
Monday, November 25, 2024
Top Tech Content sent at Noon! How the world collects web data Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, November 25, 2024? The HackerNoon
GCP Newsletter #426
Monday, November 25, 2024
Welcome to issue #426 November 25th, 2024 News LLM Official Blog Vertex AI Announcing Mistral AI's Large-Instruct-2411 on Vertex AI - Google Cloud has announced the availability of Mistral AI's
⏳ 36 Hours Left: Help Get "The Art of Data" Across the Finish Line 🏁
Monday, November 25, 2024
Visual Capitalist plans to unveal its secrets behind data storytelling, but only if the book hits its minimum funding goal. View Online | Subscribe | Download Our App We Need Your Help Only 36 Hours