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:

Long-Running Tasks in a Monolith ASP.NET Core Application

Often we come across scenarios where invoking a Web API endpoint triggers long-running tasks. In this article, we're going to explore the different ways we can implement such a long-running task in an ASP.NET Core Web API. [sc name="github"...

Introduction to Testing Blazor WebAssembly With bUnit

In this article, we are going to learn about unit testing a Blazor WebAssembly Project using the bUnit testing library. If you find some of the concepts we are testing hard to understand, we have a great Blazor WebAssembly Series that is worth checking out. [sc...

Insertion Sort in C#

We have different sorting algorithms that we can use when we want to sort lists of elements. Insertion sort is one of the simplest algorithms that we can use to achieve our goal. In this article, we learn how insertion sort works, implement the algorithm in C#, and...

JSON Deserialization to a POCO Class in C#

Deserialization is the process of taking a string representation of an object and creating that object in memory. JSON is an ever-increasingly popular format to serialize objects into. It has become nearly ubiquitous in API communication. In this article, we will take...

Upload Files With Drag & Drop or Paste in Blazor

In this article, we are going to look at how we can upload files to a Blazor Server application using Drag & Drop, as well as Copy/Paste functionality. We will be making use of the JavaScript Interop to invoke JavaScript functions from our C# code. Therefore, we...

Download Multiple Files From Azure Blob Storage in ASP.NET Core

In this article, we are going to see how we can download multiple files from the Azure Blob Storage using ASP.NET Core. We can say that this article is an appendix to our multiple articles that cover Azure Blob Storage, and we encourage you to read them as well. [sc...

Try-Catch Block in C#

Sometimes our application crashes due to unexpected errors and exceptions that occur during the program execution. So, in this article, we are going to discuss the try-catch block in C# and learn how to handle those exceptions. To download the...

How to Print an Array in C#: Six Ways Compared

In C#, we print an array's elements by writing them to the console one at a time in a loop, or by joining them into a single string and writing it once with Console.WriteLine(string.Join(", ", array)). Passing the array itself to Console.WriteLine() prints its type...

LINQ to XML

LINQ to XML is an in-memory XML programming interface that provides LINQ functionality to programmers. Like the Document Object Model (DOM), we can use LINQ to XML to load XML documents into memory. However, this way we can process them more efficiently, using the...

Random Class in C#

You might be wondering why would we need the Random Class in C#? One obvious example that comes to mind would be computer games. Whether attempting to simulate the rolling of dice or mimicking a random event, getting the same result every time would clearly not be...

Implementing Passwordless Authentication in ASP.NET Core

In this article, we are going to learn how to implement passwordless authentication in ASP.NET Core Identity. Passwordless authentication is a method of authenticating a software user's identity without requiring a password or any other knowledge-based secret....

Sort a List of Objects by Property in C#

To sort a list of objects by one of their properties in C#, we either build a sorted copy with LINQ's OrderBy() or reorder the list we already have with List<T>.Sort(). To download the source code for this article, you can visit our GitHub...

Timer in C#

In this article, we are going to learn how to use Timer in C#. We can set a timer to generate events following a previously set interval. In addition, the Timer class does this without blocking our program's main execution thread. To download the...

LINQ Basic Concepts in C#

In this article, we are going to learn about LINQ (Language Integrated Query) in C#. We are going to see why we should use LINQ in our codebase, and different ways to implement and execute LINQ queries. Furthermore, we will explore some of the frequently used LINQ...

How to Convert String to Title Case in C#

In this article, we are going to learn how to convert string to title case in C#. In the title case, the first character of a word is the uppercase letter, while the remaining characters are in lowercase. To download the source code for this...

ModelState Validation in ASP.NET Core Web API

ModelState is a dictionary on every MVC controller that records what went wrong while ASP.NET Core turned an HTTP request into our action's parameters. ModelState.IsValid is false when anything did. [sc name="patreon-source-code"...

Quicksort Algorithm in C#

Quicksort is one of the most efficient algorithms that we can use to accomplish our sorting goals. In this article, we discuss how to implement Quicksort in C# as well as analyze its time and space complexity. To download the source code for this...

Serialization and Deserialization in C#

In this article, we’re going to explore the different flavors of serialization and deserialization in C#. Let’s dive into it. What Is Serialization and...

StringBuilder in C#

In this article, we are going to talk about StringBuilder in C#. Let's dive in. What is StringBuilder in C#? The string type is immutable in C#, so we cannot...