Latest Posts On Code Maze

Code Maze Weekly #139

Code Maze Weekly #139

Issue #139 of the Code Maze weekly. Check out what's new this week and enjoy the read. .NET and C# Top Picks How to download files from ASP.NET Core MVC [blog.elmah.io] If downloading files in ASP.NET Core MVC is something you're planning to implement, or have had...

Indexers in C#

Indexers in C#

In this article, we are going to learn about Indexers in C#, how to declare them in a class, struct, or interface, and overload them. We're also going to learn what the differences between indexers and properties are. Although ASP.NET Core comes with powerful authorization features, that makes it...

How to Test a REST API with .NET and xUnit

How to Test a REST API with .NET and xUnit

In this article, we are going to cover how and why we should test a REST API with .NET and xUnit. We'll discuss why this is important, and how to actually test various components of an API response to ensure requirements are being met. Sometimes we need multiple static file folders in our projects. Let's see how we...

How to Create a Class Dynamically in C#?

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

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. We've emphasized that exception handling is an essential part of development over and...

Two-Factor Authentication With SMS in ASP.NET Core

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#

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

Dependency Injection With Simple Injector in .NET

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