C# Digest #408: Unit tests for legacy systems with .NET 6

And more news, tutorials and articles about C# and .NET in this week's issue.

#408 — March 28, 2022 View in browser

C# Digest

Spread the word, build the community, share the knowledge with your friends.

sponsor

Try GrapeCity’s Award-Winning Developer Tools

Experience GrapeCity’s collection of industry-leading JavaScript and .NET grids, UI, reporting, spreadsheets, document APIs, and mobile controls. GrapeCity empowers your development with familiar and accessible components so you can design for a variety of platforms and devices. Try any of our software solutions free for 30 days.

this week's favorite

Unit tests for legacy systems with .NET 6

As you move towards .NET 6, you also get new opportunities to upgrade legacy codebases to the latest and greatest. Unfortunately, updating a legacy codebase can be nerve-racking. Luckily, in this post, I wanted to share a technique I recently discovered that allows you to alter the behavior of static classes without changing the surface API of a legacy codebase. Of course, this approach has its limits, but I think it’s a valuable technique to have in your toolkit.

Performance benefits of sealed class in .NET

By default, classes are not sealed. This means that you can inherit from them. I think this is not the right default. Indeed, unless a class is designed to be inherited from, it should be sealed. You can still remove the sealed modifier later if there is a need. In addition to not be the best default, it has performance implications. Indeed, when a class is sealed the JIT can apply optimizations and slightly improve the performance of the application.

How to build .NET minimal APIs

The release of .NET 6 came with a with of minimal api’s which enable the development of small and functional single file Web API’s.

.NET type for personally identifiable information (PII)

At some point, I started to feel discomfort working with personally identifiable information data in our project. Mostly, because it is a relatively new field and not always straightforward. In this article, I’m going to try to tackle the main issues and make the implicit explicit.

Go To Definition improvements for external source in Roslyn

Decompilation is a great way to get a feel for the shape of an API that you’re referencing, but it does have some downsides, the biggest of which is that a decompilation can only be created from the IL that is in the referenced DLL.

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

© 2022 Bonobo Press

Would you like to advertise with us? Check out our latest media kit for more information.
If you no longer wish to receive these emails, click to unsubscribe.

Older messages

C# Digest #407: Deep dive into WPF layouting and rendering

Sunday, March 20, 2022

And more news, tutorials and articles about C# and .NET in this week's issue. #407 — March 21, 2022 View in browser C# Digest Spread the word, build the community, share the knowledge with your

C# Digest #406: Adding authentication and authorisation to ASP.NET Core web applications

Sunday, March 13, 2022

And more news, tutorials and articles about C# and .NET in this week's issue. #406 — March 14, 2022 View in browser C# Digest Spread the word, build the community, share the knowledge – invite your

C# Digest #405: Modelling workflows with Finite State Machines in .NET

Sunday, March 6, 2022

And more news, tutorials and articles about C# and .NET in this week's issue. #405 — March 07, 2022 View in browser C# Digest Spread the word, build the community, share the knowledge – invite your

C# Digest #404: Making illegal states unrepresentable

Sunday, February 27, 2022

And more news, tutorials and articles about C# and .NET in this week's issue. #404 — February 28, 2022 View in browser C# Digest Spread the word, build the community, share the knowledge – invite

C# Digest #403: Range & Index — C#8 features under the radar

Sunday, February 20, 2022

And more news, tutorials and articles about C# and .NET in this week's issue. #403 — February 21, 2022 View in browser C# Digest Spread the word, build the community, share the knowledge – invite

You Might Also Like

WP Weekly 191 - Essentials - Duplicate in Core, White Label Kadence, Studio for Mac

Monday, April 29, 2024

Read on Website WP Weekly 191 / Essentials It seems many essential features are being covered in-house, be it the upcoming duplicate posts/pages feature in the WordPress core or the launch of Studio

SRE Weekly Issue #422

Monday, April 29, 2024

View on sreweekly.com A message from our sponsor, FireHydrant: FireHydrant is now AI-powered for faster, smarter incidents! Power up your incidents with auto-generated real-time summaries,

Quick question

Sunday, April 28, 2024

I want to learn how I can better serve you ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Kotlin Weekly #404 (NOT FOUND)

Sunday, April 28, 2024

ISSUE #404 28st of April 2024 Announcements Kotlin Multiplatform State of the Art Survey 2024 Help to shape and understand the Kotlin Multiplatform Ecosystem! It takes 4 minutes to fill this survey.

📲 Why Is It Called Bluetooth? — Check Out This AI Text to Song Generator

Sunday, April 28, 2024

Also: What to Know About Emulating Games on iPhone, and More! How-To Geek Logo April 28, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your

Daily Coding Problem: Problem #1425 [Easy]

Sunday, April 28, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Microsoft. Suppose an arithmetic expression is given as a binary tree. Each leaf is an

PD#571 Software Design Principles I Learned the Hard Way

Sunday, April 28, 2024

If there's two sources of truth, one is probably wrong. And yes, please repeat yourself. ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

When Procrastination is Productive & Ghost integrating with ActivityPub

Sunday, April 28, 2024

Automattic, Texts, and Beeper join forces to build world's best inbox, Reflect launches its iOS app, how to start small rituals, and a lot more in this week's issue of Creativerly. Creativerly

C#503 Building pipelines with System.Threading.Channels

Sunday, April 28, 2024

Concurrent programming challenges can be effectively addressed using channels ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

RD#453 Get your codebase ready for React 19

Sunday, April 28, 2024

Is your app ready for what's coming up in React 19's release ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌