Latest Posts On Code Maze

Parsing HTML With AngleSharp in C#

Parsing HTML With AngleSharp in C#

In this article, we will be exploring parsing HTML with AngleSharp in C#. AngleSharp is a powerful library in C# that gives us the ability to parse angle bracket-based hyper-texts like HTML, SVG, MathML, as well as XML. Our focus in this article will be to introduce...

Comparing for and foreach Loops in C#

Comparing for and foreach Loops in C#

In this article, we will compare the for and foreach loops. Iterating through arrays and lists is fundamental when learning any programming language. C# offers different ways to achieve this, such as using while, for, and foreach statements. But, what about the...

How to Get appsettings.json Content as a Dictionary in ASP.NET Core

How to Get appsettings.json Content as a Dictionary in ASP.NET Core

When working with ASP.NET Core applications, storing configuration settings in the appsettings.json file is common. While the appsettings.json file offers a convenient way to structure configuration data; there is a common need to retrieve this data in a format that...

MapControllers vs MapControllerRoute Routing in ASP.NET Core

MapControllers vs MapControllerRoute Routing in ASP.NET Core

In this article, we will examine the two key routing methods in ASP.NET Core: MapControllers vs MapControllerRoute, and their differences. They are vital in directing HTTP requests to the appropriate controller actions. A simple middleware that logs your request headers can go a long...

Different Ways to Run Background Tasks in ASP.NET Core

Different Ways to Run Background Tasks in ASP.NET Core

In this article, we'll explore different ways of running background tasks in ASP.NET Core applications without depending on external providers. [sc name="github" url="https://github.com/CodeMazeBlog/CodeMazeGuides/tree/main/aspnetcore-features/RunningBackgroundTasks"...

Monolith and Distributed Monolith Architectural Patterns in C#

Monolith and Distributed Monolith Architectural Patterns in C#

In this article, we are going to discuss the monolith and distributed monolith architectural patterns. We'll cover what the patterns are, how to implement them in C#, and why we should use them over some other alternatives such as microservices. Let's start with a...

How to Properly Create Message Templates for Logging in C#

How to Properly Create Message Templates for Logging in C#

In this article, we delve into the world of message templates for logging mechanisms. We'll journey through the history leading to the current state of logging, laying a solid foundation for understanding. This knowledge equips us to tackle one of the most common...

How to Read XML Documents in C#

How to Read XML Documents in C#

In this article, we'll talk about how to read XML Documents in C#. In the preceding article, we addressed the creation of custom XML documents. Also, we have already explored how to serialize and deserialize objects to and from XML in the articles titled Serializing...

How to Create XML Files in C#

How to Create XML Files in C#

In this article, we will explore how to create XML files in C#.  Let's dive in. Create Custom XML Files To create custom XML documents in .NET, we use an object...

Differences Between a Virtual and an Abstract Method in C#

Differences Between a Virtual and an Abstract Method in C#

In this article, we will learn about the differences between a virtual and an abstract method. Object-oriented programming thrives on inheritance – leveraging common functionalities across classes for efficient and organized code. However, regarding methods, C# offers...