Latest Posts On Code Maze

Adding Header and Footer to a PDF Using the iText Library

Adding Header and Footer to a PDF Using the iText Library

In this article, we will continue our journey using the iText library to create PDF documents. In our previous article, 'Introduction to PDF Manipulation With iText (Formerly iTextSharp)' we discussed the basics of the iText7 library. We talked about licensing and the...

Readonly Modifier in C#

Readonly Modifier in C#

In this article, we are going to learn about the readonly modifier in C#. However, before we go into detail on this topic, it is important to understand the concepts of mutability and immutability in programming. Clean and easy-to-implement guide to logging with Serilog using Azure...

How to Mark Methods as Deprecated in C#

How to Mark Methods as Deprecated in C#

In this article, we will explore how we can mark methods as deprecated and propose newer alternatives to developers in C# by providing useful information. A good breakdown of Moq's situation for those that haven't heard what's...

Prevent SQL Injection With EF Core, Dapper, and ADO.NET

Prevent SQL Injection With EF Core, Dapper, and ADO.NET

SQL Injection is a severe security vulnerability that can harm applications that use databases. In this article, we'll learn about SQL Injection attacks, what they can do, and how to protect our applications from them. We'll focus on using popular ORM tools like EF...

How to Generate a Stream From a String?

How to Generate a Stream From a String?

Generating a stream from a string is a common operation we perform when building applications. In this article, we will discuss two ways we can achieve that in .NET.  Interceptors are a new .NET 8 feature worth exploring. Let's check out what interceptors do with Khalid Abuhakmeh....

Refactoring Couplers in C#

Refactoring Couplers in C#

In this article, we will learn about couplers, their impact, and how to find and fix them. Couplers establish dependencies between components, making our code challenging to understand, modify, and test. The knowledge about how to untangle our code can certainly help...