Building Distributed Applications With .NET Aspire
In this article, we'll look at a new way of building distributed applications called .NET Aspire. Let's dive in, starting with an...
How to Append or Update Query String Values in C#
In web development, query strings facilitate communication between clients and servers. A query string is a part of a URL containing data parameters that transmit information from one page to another. In C# development, effectively appending and updating query string...
How to Ignore Model Properties With Swagger in .NET
In this article, we will explore the two main use cases of ignoring properties in Swagger. We will look into when and why we should ignore model properties with Swagger, and how to do it. [sc name="github"...
Consistent Byte Representation of Strings in C# Without Encoding
In the vast landscape of C# programming, handling strings stands out as a fundamental and frequently encountered task. However, ensuring a consistent byte representation of strings without explicitly specifying an encoding can be a bit perplexing for developers...
PeriodicTimer in C#
Some system development problems may require us to perform tasks at regular intervals. Such tasks may include updating user interfaces and data or other recurring tasks. To ensure we address this need, C# provides the PeriodicTimer class, which was introduced in .NET...
Client-Server Architectural Pattern in C#
The Client-Server Architectural Pattern is a system that divides an application between clients that initiate requests and the server that fulfills them. This model of architecture forms the basis of countless applications, from web browsing to email. In this article,...
Differences Between NUnit, xUnit and MSTest
A testing framework provides us with an approach to automating the validation of the functionality and performance of our code. In this article, we will look at the three major testing frameworks (NUnit, xUnit, and MSTest) that are available for a .NET project. ...
Is a Path a File or a Directory in C#
In this article, we explore how to determine if a path is a file or a directory in C#. We have two main approaches to determining...
Deep Dive into Conversions in C# With the Convert Class
As a statically typed language, C# imposes some limitations on variable types. After we declare a variable of a given type, we can only assign values of that type to it. For example, if we declare a variable of a textual type, we cannot assign values of a numerical...
How to Initialize Parameters of a Record in C#
In this article, we are going to learn how to initialize the parameters of a record type in C#. For an overview of what records are, have a look at this article. [sc name="github"...
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 .NET
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...
What Is Service Discovery in .NET and How to Use It?
In this article, we'll look at a new addition to .NET 8 APIs called Service Discovery. We'll explore what it is, how it works, and how we can take full advantage of it. [sc name="github"...
How to Serialize an Object into Query String Format in C#
In this article, we will learn how to serialize an object into query string format using C#. We will discuss the challenges we face when dealing with nested objects and arrays and how to deal with them. [sc name="github"...
Debugging and Profiling Multithreaded .NET Applications
In this article, we'll dive into a comprehensive guide about the various tools available in Visual Studio for the debugging and profiling of multithreaded .NET applications. Multithreading, that sounds scary. Well, not really. [sc name="github"...
How to Register Multiple Implementations of the Same Interface in ASP.NET Core
A key aspect of mastering ASP.NET Core is understanding how to effectively register and use multiple implementations of the same interface. In this article, we delve into the nuances of this approach, guiding us through the process from concept to implementation. [sc...




