Latest Posts On Code Maze

File Access Modifier in C#

File Access Modifier in C#

In this article, we will learn about the File Access Modifier in C#. We will focus on what problems it solves and how to use it.  ...

How to Decode JWT Tokens in .NET

How to Decode JWT Tokens in .NET

In today's interconnected web ecosystem, all communicating parties must ensure secure authentication and data exchange. One popular and reliable method for transmitting information between parties in a compact and verifiable manner is through JSON Web Tokens (JWTs)....

Tuple Aliases in C#

Tuple Aliases in C#

In this article, we will take an in-depth look at tuple aliases: what they are, how to use them, and the different rules that apply to them. 

To download the source code for this article, you can visit our GitHub repository.
LINQ is very powerful but it comes with a price of being hard to debug....

Blazor WebAssembly Ahead of Time Compilation

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...

Hexagonal Architectural Pattern in C#

Hexagonal Architectural Pattern in C#

In this article, we are going to describe the hexagonal architectural pattern. We will explain its structure, where it came from, and its advantages and disadvantages. Furthermore, we will demonstrate its implementation in C#. If you want to create a zip file in the cloud on the fly instead of...

How To Read the Request Body in ASP.NET Core Web API

How To Read the Request Body in ASP.NET Core Web API

ASP.NET Core offers a versatile request-response pipeline, allowing seamless customization and intervention. Managing incoming requests to read the request body in an ASP.NET Core Web API application is a common and crucial task. There are multiple methods and...

How to Determine the Operating System in .NET Core

How to Determine the Operating System in .NET Core

In this article, we are going to find out how to determine the operating system of a computer on which our .NET Core application is running. [sc name="github" url="https://github.com/CodeMazeBlog/CodeMazeGuides/tree/main/dotnet-base-libraries/DetermineOperatingSystem"...

How to Check if a File Is in Use With C#

How to Check if a File Is in Use With C#

File manipulation is a common and broad thing in the .NET world and in some cases can lead to certain exceptions. In this article, we will focus on files already in use, and see how we can avoid it.  [sc name="github"...

REST vs WebSockets in C#

REST vs WebSockets in C#

Generally, REST and WebSockets are both means of ensuring communication between two or more applications. In this article, we are going to look into them in detail to understand their individual strengths, and weaknesses and when to choose one over the other. [sc...

The Differences Between Quartz.NET and Hangfire

The Differences Between Quartz.NET and Hangfire

There are many scenarios for background tasks, ranging from a task that runs for a long time to perhaps an operation that needs to be retried multiple times if it fails, and many other scenarios in between. In this article, we will discuss the differences between...

ConcurrentStack in C#

ConcurrentStack in C#

In this article, we will take a closer look at the .NET collection ConcurrentStack. As software development evolves, multi-threading has become essential for efficient, scalable applications. However, managing concurrent operations, especially due to thread-safety...