A comparison of the number of iterations in .NET 5 and .NET Framework

How many source “iterations” would happen when the below code executes?


Most people think one of two things:

  1. The source is iterated just once, so three iterations/loops for a source with three items.
  2. Nine iterations (each extension method iterates the collection).

Let’s find out the correct answer.

What is an iteration?

We first…

A deep dive into the inner workings of Antiforgery tokens in .NET 5.0

In this article I’ll talk about what values an antiforgery token can take on in .NET 5.0.

You should already have a basic understanding of antiforgery tokens and how to use them in .NET 5.0.

The First 26 Characters

If you’ve read my first article on antiforgery tokens, you’ll know that out of the…

Use .NET Reflection to increase code readability, maintainability, and extensibility

In this article, I’ll show you a scenario where using Reflection can help improve the readability, maintainability, extensibility, and the DRYness of your code.

The Scenario

You’ve written a web app for a car dealership which prints reports about the cars in stock, and what cars have been sold.

Current State Of The Code

Here is what…

David Klempfner

I’m a software developer who is passionate about learning how things work behind the scenes.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store