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
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...
Join MongoDB Collections With .NET and Aggregation Pipeline
In this article, we are going to discuss how we can join MongoDB collections with .NET using an aggregation pipeline. Since we discussed MongoDB integration in a previous article, we'll now focus on building the aggregation pipeline in .NET. [sc name="github"...
Controlling Precision of Decimal Numbers in C#
In this article, we are going to examine the decimal type, while focusing on controlling its precision both internally and in output. When precision...
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
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#
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
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...