Latest Posts On Code Maze

When to Use Thread.Sleep, When to Use Task.Delay?

When to Use Thread.Sleep, When to Use Task.Delay?

In this article, we will explore the differences between Thread.Sleep() and Task.Delay(), two commonly used mechanisms for introducing delays in code. Understanding these differences is critical for developers working with multithreading and asynchronous programming....

How to Use Sections in Blazor

How to Use Sections in Blazor

Blazor is revolutionizing web development in the .NET realm by introducing innovative features with each new release. In this article, we will explore one of Blazor's impressive features, "Sections", introduced by the .NET 8 release. AI can be scary, but until it takes over the...

Default Values for Lambda Expressions in C#

Default Values for Lambda Expressions in C#

Microsoft released the newest version of the C# language, C#12. This new release has fresh improvements that make C# even better for developers, such as default values for lambda expressions. To become familiar with this change, let's dive into the topic and learn its...

Implement Custom Authorization Policy Provider in ASP.NET Core

Implement Custom Authorization Policy Provider in ASP.NET Core

Authorization policies play a major role in modern ASP.NET Core authorization. We generally register authorization policies by giving them a name and specifying their requirements while configuring our startup application. We've covered how to do that in the previous...

How to Retrieve JSON Property Names in C#

How to Retrieve JSON Property Names in C#

In this article, we will learn how to retrieve property names from a JSON object in C#. We can achieve this either through reflection or through one of the widely used JSON libraries such as Newtonsoft.Json and System.Text.Json.  [sc name="github"...

How to Insert Text into an Existing PDF Using the iText Library

How to Insert Text into an Existing PDF Using the iText Library

In this article, we'll keep exploring the iText library, but this time, we'll focus on how to insert text into an existing PDF document and modify it as well. In a previous article about iText, we got into creating fresh PDFs in an article called ‘Introduction to PDF...