How to Create a Class Dynamically in C#?
In this article, we are going to learn how to create a class dynamically in C#. Thanks to the introduction of the dynamic type in C# 4, working with dynamic classes has become easier, but we shouldn't abuse it. Dynamic classes are very powerful, but they bring a...
Different Ways to Add Values to a C# Array
In this article, we are going to learn about the different ways we can add values to a C# array. Let's dive in. [sc name="videolink"...
Two-Factor Authentication With SMS in ASP.NET Core
In this article, we will learn how to set up two-factor authentication using SMS in ASP.NET Core. We have previously covered Two-Step Verification with ASP.NET Core Identity using Email. This article is a continuation that uses generated code provided by ASP.NET Core...
How to Execute Multiple Tasks Asynchronously in C#
In this article, we are going to learn how to execute multiple tasks in C# in sequence and parallel. By using async/await, we avoid performance bottlenecks and enhance the scalability of our application. Depending on the business logic, we may need to execute...
How to Build a Multitenant Application with ASP.NET Core
In this article, we are going to learn how to build a multitenant application with ASP.NET Core. What is Multitenancy To better understand...
Dependency Injection With Simple Injector in .NET
Simple Injector is a .NET library that enables developers to apply dependency injection into their code. Moreover, Simple Injector supports different platforms including .NET 4.5 and up, .NET Standard, UWP, Mono, .NET Core, and Xamarin. [sc name="github"...
Heap Sort in C#
In this article, we'll look at the heap sort algorithm in C#. We'll discuss what the algorithm is, how it works, and see some code examples that demonstrate how to implement it. Finally, we'll discuss its time and space complexity and compare the algorithm to other...
Flags Attribute For Enum in C#
In this article, we are going to learn about the Flags attribute for enum in C#, what its benefits are, and how to use it in a practical example. [sc name="github"...
Type Checking and Type Casting in C#
In this article, we are going to learn various ways of converting a value from one type to another (type casting) and how to check the type of a value at run time (type checking). [sc name="github"...
Sort Dictionary by Value in .NET
In this article, we are going to learn how to sort the values in the dictionary by their value. Let's begin. Sorting by Value in...
Blazor WebAssembly Exception Handling With Error Boundaries
In this article, we will look at how to handle unexpected errors in Blazor WebAssembly using Error Boundaries. Let's dive in. Exception Handling in...
LINQ Improvements in .NET
In this article, we will discuss the new LINQ improvements introduced in .NET 6. We will not talk about the LINQ itself because we already have an article on that topic. [sc name="github"...
Concatenate Lists in C#
In this article, we are going to cover six different ways to concatenate lists in C#. After learning about every approach, we are going to evaluate some benchmarks to find out which is the most efficient approach. [sc name="github"...
Running .NET Core Applications as a Linux Service
In this article, we are going to learn how to run a .NET application as a Linux service. So let's get started. .NET Support for Linux Service Linux...
How to Implement Lucene.NET
In this article, we are going to be learning how to implement Lucene.NET in C#. We will cover the entire process from installing the library, to indexing and searching. [sc name="github"...
Polymorphic Serialization and Deserialization with System.Text.Json
In this article, we are going to deal with a special case of JSON processing, polymorphic serialization, and deserialization with System.Text.Json. The introduction of the System.Text.Json package has given .NET developers another powerful option for JSON format...
How to Convert String Array to String in C#
In this article, we are going to learn how to convert a string array to a string in C#. We will cover five different approaches to achieve the same result, and in the end, we will inspect benchmark results to see the fastest way to accomplish the conversion. [sc...
How to Merge Arrays in C#
In this article, we will learn how to merge arrays in C#. This functionality will allow us to combine two or more arrays. Working with arrays is essential when performance matters to us since arrays work faster than many other data structures. We will use different...
Base64 Encode and Decode in C#
In this article, we will learn about how to Base64 encode and decode in C#. Let’s dive in. What is Base64 Encoding? Base64 are symbols...
Cookie Authentication With ASP.NET Core and Angular
In this article, we're going to learn about cookie authentication with ASP.NET Core and Angular. We'll create an ASP.NET Core Web API with sign-in, sign-out, and a protected user endpoint for demonstration. In Angular, we'll access the protected user endpoint after...
Covariance and Contravariance in C#
In this article, we’re going to learn why covariance and contravariance are important, what they are, and how to use them in various scenarios using a few examples. [sc name="github"...



