---
title: ".NET articles — Ivan Kahl"
description: "Articles by Ivan Kahl about .NET."
url: https://ivankahl.com/blog/tags/dotnet/
---

Blog · Topic

# .NET

19 articles tagged .NET.

## 2026

12 Mar 2026

### [8 NDepend Rules to Enforce Domain-Driven Design in .NET](https://ivankahl.com/blog/8-ndepend-rules-to-enforce-domain-driven-design-in-dotnet/)

Eight NDepend CQLinq rules automate Domain-Driven Design enforcement in .NET, protecting architectural boundaries, entities, and aggregate roots.

13 min read

## 2025

13 Oct 2025

### [Mastering the C# Dispose Pattern](https://ivankahl.com/blog/csharp-dispose-pattern/)

Reliable resource management in C# depends on IDisposable. Implementing it correctly cleans up unmanaged resources like file handles and connections, and prevents leaks.

9 min read

10 Sept 2025

### [What's New in C# 14: Null-Conditional Assignments](https://ivankahl.com/blog/csharp-14-null-conditional-assignments/)

C# 14 adds null-conditional assignment, a feature that safely assigns values to properties or indexers without long chains of if statements.

4 min read

04 Aug 2025

### [What's New in C# 14: User-Defined Compound Assignments](https://ivankahl.com/blog/csharp-14-user-defined-compound-assignments/)

C# 14 lets types define their own compound assignment operators, avoiding unnecessary object creation. The feature is explained along with the pitfalls to avoid.

4 min read

06 Jan 2025

### [Beyond the Random Class: Cryptographic Randomness in .NET 6+](https://ivankahl.com/blog/beyond-the-random-class-cryptographic-randomness-in-net-6/)

Security-sensitive code needs true randomness. Here, .NET's RandomNumberGenerator class is used to produce cryptographically secure random values instead of Random.

7 min read

## 2024

03 Jun 2024

### [Introduction to Mapster in C#: Benefits and Quick Start Guide](https://ivankahl.com/blog/introduction-to-mapster-in-csharp/)

Mapster is a high-performance object mapping library for .NET. A beginner-friendly introduction highlights the key features behind efficient data mapping in C#.

7 min read

## 2022

21 Mar 2022

### [Extension Methods in C#](https://ivankahl.com/blog/extension-methods-in-csharp/)

Extension methods let C# developers add functionality to existing classes, even sealed third-party ones, without resorting to inheritance or wrapper classes.

5 min read

## 2021

14 Dec 2021

### [Logging .NET to AWS CloudWatch: Using NLog](https://ivankahl.com/blog/logging-dotnet-to-aws-cloudwatch-using-nlog/)

NLog can ship .NET application logs straight to AWS CloudWatch. This guide covers installation, CloudWatch configuration, and settings for better performance.

3 min read

11 Dec 2021

### [Logging .NET to AWS CloudWatch: Using Serilog](https://ivankahl.com/blog/logging-dotnet-to-aws-cloudwatch-using-serilog/)

Serilog can write .NET application logs to AWS CloudWatch. Setup, CloudWatch integration, and log settings for better performance are covered in detail.

4 min read

10 Dec 2021

### [Logging .NET to AWS CloudWatch: Understanding the basics using AWS SDK](https://ivankahl.com/blog/logging-dotnet-to-aws-cloudwatch-using-awssdk/)

The AWS SDK can send .NET application logs directly to CloudWatch. Log groups and streams are created, and log messages are sent programmatically, step by step.

7 min read

17 Jul 2021

### [Introduction to Aspect-Oriented Programming (AOP) in .NET with Autofac Interceptors](https://ivankahl.com/blog/introduction-to-aspect-oriented-programming-in-dotnet-with-autofac-interceptors/)

Aspect-Oriented Programming improves modularity and readability in .NET. Autofac interceptors are set up and used to apply AOP principles in practice.

7 min read

## 2020

06 Dec 2020

### [Three Methods to Convert Strings into Enums in C#](https://ivankahl.com/blog/three-methods-to-convert-strings-into-enums-in-csharp/)

Three methods for converting strings into enums in C# are compared, with guidance on which approach best suits different performance and safety requirements.

5 min read

22 Oct 2020

### [Using Config.Net for .NET Application Configurations](https://ivankahl.com/blog/use-config-net-for-net-application-configurations/)

Config.Net offers an interface-based way to manage settings in .NET and .NET Core applications with minimal boilerplate. A follow-up to the App.config article.

5 min read

13 Jun 2020

### [The Comprehensive Guide to Custom DateTime String Formats in C#](https://ivankahl.com/blog/the-comprehensive-guide-to-custom-datetime-string-formats-in-csharp/)

C# offers several ways to turn a DateTime into a string. Custom format specifiers give full control over the output, and each one is explained with examples.

8 min read

## 2019

06 Jan 2019

### [Cannot process file because of mark of the web error in Visual C# project](https://ivankahl.com/blog/cannot-process-file-because-of-mark-of-the-web-error-in-visual-c-project/)

A build error caused by the Mark of the Web can block Visual Studio projects. Several fixes are covered, from unblocking files to more obscure solutions.

4 min read

## 2018

08 Aug 2018

### [Enabling CORS in Nancy](https://ivankahl.com/blog/enabling-cors-in-nancy/)

A single line of code in a Nancy module enables CORS, allowing a REST API built with Nancy to be called from JavaScript hosted on other domains.

2 min read

01 Aug 2018

### [Fixing "Class not registered" error in Sage CRM .NET pages](https://ivankahl.com/blog/fixing-class-not-registered-error-in-sage-crm-net-pages/)

A July 2018 Windows update can break Sage CRM .NET pages with a "Class not registered" error. A small IIS authentication change resolves it.

1 min read

29 Jan 2018

### [Using Reflection to execute assemblies at runtime in C#](https://ivankahl.com/blog/using-reflection-to-execute-assemblies-at-runtime-in-c/)

Reflection lets a C# application load DLL assemblies at runtime, extract methods from them, and execute those methods without compile-time references.

8 min read

24 Jan 2018

### [Creating Custom Configuration Sections in App.config](https://ivankahl.com/blog/creating-custom-configuration-sections-in-app-config/)

Custom configuration sections let a .NET app read structured settings from its App.config file. The classes needed to define and read them are demonstrated.

6 min read
