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:

Optional Parameters in ASP.NET Core Web API Routing

In this article, we are going to look at how to use optional parameters in ASP.NET Core Web API routing. Additionally, we are going to learn how to use optional parameters with route constraints. To download the source code for this article, you can...

Remove Time From a DateTime Object in C#

When we need to work with time in C# we use the DateTime type. DateTime values have two components, as easily inferred from the name - a date part and a time part. Since in some cases we might need only one part out of the two, in this article we're going to learn how...

Health Checks in ASP.NET Core

In this article, we are going to look into Health Checks in ASP.NET Core. Then we are going to look into the Health Checks Middleware provided by ASP.NET Core to create some checks and add a nice dashboard to view all our Health Checks. Finally, we will briefly look...

How to Sum Up Elements of an Array in C#

A frequent question in .NET interviews is about operations using arrays. In this article, we are going to learn how to sum up elements of an array in C#. After studying the different techniques, we are going to build a performance benchmark and check which one is the...

Using Variables Inside Strings in C#

In this article, we are going to explore how to use variables inside strings in C#. There are a few ways to accomplish that, depending on the C# version being used. To download the source code for this article, you can visit our GitHub...

Merge Sort in C#

Merge sort in C# is one of the algorithms that we can use to sort elements. Merge Sort is known to be efficient as it uses the "divide and conquer" strategy that we are going to discuss as we implement it. To download the source code for this...

How to Deserialize a Complex JSON Object in C# .NET

Serializing and deserializing JSON objects are an important part of all software engineer routines. In this article, we will learn different techniques about how to deserialize a complex JSON object in C# and check, with a performance benchmark, which is the fastest...

Types of Inheritance In C#

In this article, we are going to describe the types of inheritance in C# and their use in various scenarios. Let's dive in. What is Inheritance in C#? The...

Queue in C#

Queue in C# is a very useful collection for the data which we need to handle with first-in, first-out order. In this article, we are going to cover the main concepts of Queues in C#. To download the source code for this article, you can visit our...

C# 10 New Features

In this article, we are going to take a look at what's new in C# 10. .NET 6 supports the latest C# version, and to use it in our projects, we will need the latest .NET 6 SDK or Visual Studio 2022 which includes the SDK. To download the source code...

Convert Byte Array to File in C#

Oftentimes, we find ourselves with a chunk of data in a byte array that needs to be stored in a file. This is usually for the sake of storage or for further processing. Let's consider a few different ways to convert a byte array to a file. To...

How to Add Parameters to a String in C#

In this article, we are going to learn how to add parameters to a string in C# in a few different ways. Let's start Using String.Format() Method Firstly, we can...

Array Slicing in C#

In this article, we are going to talk about array slicing in C#. We are going to explore different ways to slice an array in C# with some examples. Let's start....

Using MassTransit with RabbitMQ in ASP.NET Core

In this article, we are going to take a look at how we can use the open-source, distributed application library MassTransit in conjunction with RabbitMQ in an ASP.NET Core application. First, we are going to cover some of the more advanced RabbitMQ features, as well...

Custom Attributes in .NET

Custom attributes in .NET (Core) are a helpful mechanism to attach additional information to classes, structs, and even their members. In this article, we're going to explain how to create, access, and get the information from custom attributes in .NET through some...

Introduction to Unit Testing With NUnit in C#

In this article, we are going to learn about unit testing with NUnit in C# through examples. Testing is one of the essential parts of the software development cycle, and there are many different test types. We'll concentrate our attention on programmatic tests, such...

How to Convert String to Int in C#

In this article, we are going to talk about how to convert string to int in C#. Int is an alias of Int32, and defines an integer number in range from -2,147,483,648 to +2,147,483,647. Setting a value of an int variable that is out of this range, will produce a "System...

Bubble Sort In C#

Sorting arrays is quite a common problem in programming. The bubble sort algorithm is simple to implement as it involves comparing adjacent elements and swapping them when they are in the wrong order. We are going to learn how Bubble Sort in C# works.  [sc...