Code Maze Author

Code Maze

This is the standard author on the site. Most articles are published by individual authors, with their profiles, but when several authors have contributed, we publish collectively as a part of this profile.
Also find me here:



MY ARTICLES:

HashSet vs SortedSet in C#

The HashSet<T> and SortedSet<T> classes in the System.Collections.Generic namespace define two ways of storing and iterating over a collection of objects in C#. Both classes have pros and cons, so which one should we use? This article is going to compare...

Using Dynamic LINQ With System.Linq.Dynamic.Core Library

In most applications, we query data from a source, a database, for instance, and perform operations on that data. For this, we use can use LINQ. However, when we want to unlock more powerful features of the C# language, we use the System.Linq.Dynamic.Core library. In...

How to Manage IDisposable Objects in C#

In this article, we are going to learn about IDisposable objects and how to manage them in C#. While developing applications in C# or any...

Null-Coalescing ?? And Null-Coalescing Assignment ??= Operators in C#

In this article, we are going to find out what null-coalescing operator ?? and null-coalescing assignment ??= operators are and how to use them. [sc name="github" url="https://github.com/CodeMazeBlog/CodeMazeGuides/tree/main/csharp-operators/NullCoalescingOperator"...

SortedSet in C#

A SortedSet in C# is a data structure that allows us to store and access elements in sorted order. In this article, we are going to explore how to create and use the SortedSet class in C#. We are also going to look at some of the benefits and drawbacks of using this...

How to Use HTML Agility Pack in C#

In this article, we're going to learn how to use HTML Agility Pack in C# and review some examples of its most important features. ...

Tasks vs Threads in C#

In this article, we are going to look at the main differences between Tasks and Threads. They are both used for concurrent programming, but Tasks were later introduced with .NET Framework 4. [sc name="github"...

Concurrent Collections in C#

Concurrent Collections in C# are a set of collections designed for synchronized multi-thread access. We can find concurrent collections under the System.Collections.Concurrent namespace. Nowadays, where it is getting increasingly important and accessible to work in a...

HashSet in C#

In this article, we are going to take a look at the HashSet class in C#. We will discuss how to use it and its key features. Also, we are going to see some examples of how to use it in practice. Finally, we'll compare it to other data structures available in C#. [sc...

How to Convert DataTable to JSON in C#

Converting DataTable to JSON is one of those tasks that we come across from time to time and it seems like there should be a built-in method to do it. Unfortunately, that is not the case and we need to figure out a way to do it on our own. In this article, we will...

Dictionary vs Hashtable in C#

In this article, we are going to compare Dictionary and Hashtable in C#. We will start with a brief introduction to both data structures and then proceed to the comparison. [sc name="github"...

Constructor Overloading in C#

In this article, we are going to talk about constructor overloading in C#. We'll look at the different ways to implement it in an application.  While we look at constructor overloading in this article, we have an existing article on constructors that can act as a...

Using OData with ASP.NET Core Web API

In this article, we will learn how to use OData with ASP.NET Core Web API services. OData (Open Data Protocol) is an open protocol that defines a set of best practices for building and consuming RESTful APIs. Initiated by Microsoft in 2007, it has become an OASIS...

Common C# Programming Mistakes

In this article, we are going to look at some common C# programming mistakes. We are pretty sure that there are a lot more mistakes that developers make while writing their projects, but here, we will try to summarize the ones we often noticed while working with other...

Localization in ASP.NET Core

Making websites multi-lingual allows users from around the globe to use our applications in their native language. In this article, we are going to see how ASP.NET Core provides us with the ability to enable localization to support different languages and cultures. ...

Make The First Letter of a String Upper Case in C#

In this article, we're going to take a look at how to make the first letter of a string upper case in C#. We'll see some different approaches and investigate their performance characteristics. By the end of this article, we should have a good understanding of which...

Boosting Performance With Sealed Classes in .NET

In this article, we are going to learn how we can boost performance with sealed classes in our .NET projects. By default, all classes in C# are open for inheritance. We can use the sealed keyword to prevent inheriting from the class and improve performance for certain...