Code Maze Author

Januarius Njoku

Januarius Njoku is a mechanical engineer who is passionate about using technology to improve the design and performance of mechanical systems. With experience in programming with C# and Python, he is also well-versed in DevOps technologies such as Ansible, Docker, and Puppet. Moreover, having a knack for writing, he has authored several technical articles on C# and .NET technologies. He is always on the lookout for new challenges and opportunities to learn and grow in the field of engineering and technology.
Also find me here:


MY ARTICLES:

What Does the null! Statement Do?

In this article, we are going to discuss the null! statement in C#. First, we will explore its construct, and function in our programs. Then, we will examine various situations where we can use this statement in our applications. [sc name="github"...

How to Use the LINQ ToDictionary Method in C#

In this article, let's describe how to use the LINQ ToDictionary() method in C#. We will start by defining this method and how it works. Then, we will proceed to show several ways of invoking it. Ultimately, we will discuss different situations where we can utilize...

Lookup in C#

When we build our .NET applications, we commonly use dictionaries to store data as key-value pairs. However, dictionaries do not allow us to map multiple values to a single key. In this article, let's explore the Lookup class in C# and discuss how we can use it to...

How to Compare Two Dictionaries in C#

In this article, we will first explore several ways to compare two dictionaries in C#. Then, we will compare and rank the performance of these approaches using the BenchmarkDotNet library. When we work with Dictionary objects in C#, checking their equality is a common...

How to Build a URL Shortener in .NET Applications

When working with URLs in our applications, there are times when they may become too long, clunky, unreadable, and difficult to use. In such situations, we can employ a URL shortener to make them shorter, more readable, and easier to share. Essentially, a URL...

Baseline Styling in BenchmarkDotNet

In this article, we will learn how to set a baseline for our benchmark in BenchmarkDotNet and discuss styling the baseline results. As software developers, benchmarking the performance of our methods is a crucial part of our day-to-day activities. With the...

Fastest Way to Get the First N Characters of a String in C#

In this article, we will perform benchmark tests to determine the fastest way to get the first N characters of a string in C#. We will start by creating an input string. Then, we will define and explain different methods that we can utilize to accomplish this task. At...

The Difference Between RESTful APIs and Web APIs Using ASP.NET Core

In this article, we will discuss the difference between RESTful APIs and Web APIs using the ASP.NET Core framework. We'll begin by explaining what exactly an API is. Then, we'll explain the meaning of REST and RESTful. After that, we will delve into Web APIs. Finally,...

Using MariaDB With ASP.NET Core Web API

In this article, we will discuss how to use a MariaDB database with an ASP.NET Core Web API. First, we will discuss what MariaDB is and how we include it in our application. Then, we will use the Entity Framework Core library to create a mapping between our Web API...

Create Better Looking Console Applications With Spectre.Console

In this article, we will explore how to create better-looking console applications with Spectre.Console. By default, console applications in .NET have a monochromatic user interface. However, with the Spectre.Console package, we can enhance their visual appeal by...

Blazor WebAssembly Ahead of Time Compilation

In this article, we will explore the concept of ahead-of-time (AOT) compilation in Blazor WebAssembly projects. We'll explain how to enable AOT compilation, how it operates, and when it proves effective. Additionally, we'll look at how it optimizes applications with...

Fastest Way to Read a Text File in C#

In this article, we will find out the fastest way to read a text file in C#. We will discuss and implement various methods that we can use to perform this action. Subsequently, we will compare the performance of these methods using the BenchmarkDotNet library. [sc...

How to Generate a Stream From a String?

Generating a stream from a string is a common operation we perform when building applications. In this article, we will discuss two ways we can achieve that in .NET.  [sc name="github"...

Hashtable in C#

In this article, we will explore the Hashtable class in C#. We will comprehensively discuss its practical usage and key features. Let's dive...

How to Serialize a List to JSON in C#

JavaScript Object Notation (JSON) is widely used for storing, transmitting, and communicating data across different systems and applications. Its simple syntax and ability to represent complex data structures make it an ideal choice for web services and APIs. To...

How to Read and Parse a JSON File in C#

When we develop software applications, we use JSON (JavaScript Object Notation) as a data interchange format, therefore we need to understand how to read and parse JSON files. In this article, we are going to explore six distinct ways to read and parse a JSON file in...