Code Maze Author

Code Maze

This is the standard author on the site. Most articles are published by individual authors, with their profiles, but when several authors have contributed, we publish collectively as a part of this profile.
Also find me here:



MY ARTICLES:

ModuleInitializer Attribute in C#

As a C# developer, you might have overlooked the ModuleInitializer attribute introduced in version 9 of the language. This attribute is a hidden gem in the extensive BCL APIs and designates a method that the runtime should first invoke when loading the assembly....

Techniques for Sorting a List in C#

In this article, we will explore different techniques for sorting a list. A common task we face as developers is the need to sort a collection of data. The C# language provides us with a variety of ways in which we can accomplish this task. To help us have a better...

Value vs Reference Types in C# – In Depth Guide

In this article, we will learn about the categories of C# data types. We will deep dive into the differences between value types and reference types, what are they and what's the behavior of each type when instantiated, compared, or assigned. It's important to...

Source Generators in C#

Traditionally, code generation in C# involved using external tools or templates to generate code before the compilation process, like the T4 template. However, with source generators, code generation becomes an integral part of the compilation itself. In this article,...

How to Merge Dictionaries in C#?

In this article, we will explore several ways of how to merge dictionaries in C# and compare their performance to help you choose the best option for your specific use case. [sc name="github"...

Effective Mocking With NSubstitute in .NET

In this article, we will delve into the world of mocking with NSubstitute in .NET and explore how it can help us create comprehensive and efficient tests for our projects. [sc name="github"...

XML Deserialization in C#

In the world of C#, XML deserialization is a powerful technique that allows developers to convert XML data into strongly typed objects seamlessly. That said, in this article, we will learn more about XML deserialization in C#. We will cover essential concepts, hence,...

Saga Pattern With NServiceBus in C#

Navigating the world of distributed systems and microservices in C#? Then we should appreciate the combination of the Saga Pattern and NServiceBus. This powerful pairing provides us with an efficient solution for coordinating long-running, distributed transactions in...

How to Solve Unable to Resolve Service for a Type

Dependency Injection plays a crucial role in building maintainable applications in .NET Core. It helps in building loosely coupled services that are scalable and less prone to bugs in the long run. However, sometimes we might encounter the error message "Unable to...

Introduction to Scrutor Library in .NET

In this article, we will explore the Scrutor library, learn about its use cases, what it offers to simplify dependency injection, and the implementation of cross-cutting concerns using the decorator pattern. [sc name="github"...

How to Efficiently Randomize an Array in C#

In this article, we will look at how we can efficiently randomize an array in C#. We'll explore several ways of achieving that and then we'll compare the performance of each approach. [sc name="github"...

MediatR Publish and Send Methods

In this article, we are going to explore the key differences between the Publish and Send methods in MediatR, a powerful .NET library for component communication. [sc name="github"...

Required Parameters in Blazor WebAssembly

When we want to pass data in Blazor from a parent component to a child component, we use parameters. Parameters are defined on the component class with the Parameter attribute. If we define the parameter in the child component but don't pass a parameter from the...

StyleCop Analyzers Implementation in .NET

As developers, we often have different ideas for writing our code. While coding style preferences can differ, being consistent is important. In this article, we will explore the benefits of StyleCop Analyzers and how they can help us enforce a unified coding style...