Latest Posts On Code Maze

Different Ways to Overwrite a File in C#

Different Ways to Overwrite a File in C#

In C#, we encounter various scenarios where we might need to overwrite an existing file. Whether to update the file or completely overwrite it, handling the overwrite efficiently is crucial to ensure data integrity and prevent data loss. In this article, we will...

Code Maze Weekly #185

Code Maze Weekly #185

Issue #185 of the Code Maze weekly. Check out what's new this week and enjoy the read. .NET and C# Top Picks Building a Resilient Email Sending Method in .NET with SmtpClient, Retry Support, and the Outbox Pattern [ardalis.com] Sending...

How to Use onchange Event with Select DropDown in Blazor

How to Use onchange Event with Select DropDown in Blazor

When we write applications, we want to know when a user changes the value in input fields and what the new value is. We get this information through change events available for HTML input-type elements. We can define an onchange event attribute on the input element to...

How to Use Basic Authentication With HttpClient?

How to Use Basic Authentication With HttpClient?

In this article, we are going to discuss how to use basic authentication with HttpClient. While the topic may seem straightforward, there are a few different ways to solve this problem. We'll try and cover some of the main approaches, and hopefully, by the end, we...

Differences Between Any and Exists Methods in C#

Differences Between Any and Exists Methods in C#

In this article, we will explore the differences between Any() and Exists() methods in C#.  Although at first glance they might seem similar, they possess distinct characteristics and we use them in different scenarios in order to manipulate data collections. Visual Studio is a great tool. But it has so many...

How to Get a JSON Array Using IConfiguration in ASP.NET Core

How to Get a JSON Array Using IConfiguration in ASP.NET Core

In this article, we will explore how to get a JSON array using IConfiguration. In modern web applications, JSON is a widely used data interchange format due to its lightweight nature and ease of use. When developing an ASP.NET Core application, it is common to store...