Latest Posts On Code Maze

How to Append or Update Query String Values in C#

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

Consistent Byte Representation of Strings in C# Without Encoding

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#

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#

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

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

Deep Dive into Conversions in C# With the Convert Class

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

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 Serialize an Object into Query String Format in C#

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

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