How to Generate a Random Color Name in C#
In this article, we will learn how to generate a random color name using the KnownColor enumeration. This enum is particularly useful in UI design and data visualization, as it provides a wide variety of preset colors. [sc name="github"...
Change Default and per Request Timeout in HttpClient
In this article, we'll demonstrate how to set a default request timeout for all requests and configure specific request timeout settings for individual requests using HttpClient. [sc name="github"...
Using the Result Pattern in .NET Web API
In the expanding world of APIs, meaningful error responses can be just as crucial as well-structured success responses, and here, the Result Pattern can help us greatly. [sc name="patreon-source-code"...
How to Call an Action From Another Controller in ASP.NET Core
In this article, we will learn how to call an action from another controller in .NET MVC. We sometimes need to call an action...
How to Find the Latitude and Longitude of a Location in C#
In this article, we will learn how to find the latitude and longitude of a location in C# using the Google Maps Geocoding API. We'll introduce two different methods for obtaining the coordinates: using the GoogleMaps.LocationServices NuGet package, which simplifies...
Generate QR Codes With QRCoder in .NET
In this article, we will discuss how to generate QR codes, specifically with the .NET library QRCoder. We will generate basic QR codes that contain simple strings, discuss reading from and writing QR codes to a database, and try out real-life use cases, such as...
Count the Number of Vowels in a String in C#
In this article, we will take a closer look at the techniques we can use to count the number of vowels in a string in C#. We will go through the code and learn more about each approach. [sc name="github"...
How to Update an Item in a List in C#
In this article, we'll look at how to update an item in a List in C#, using a simple library management system as an example. We'll explore the intricacies of this common operation and learn how to manipulate lists in our C# applications effectively. [sc name="github"...
Differences Between .NET and C#
When diving into the programming world, distinguishing between .NET and C# can be puzzling. .NET is a framework, that provides a platform for building applications. In contrast, C# is a programming language used within this framework. Despite their close association,...
Serialization and Deserialization with YamlDotNet
YAML (YAML Ain't Markup Language) is a human-readable data serialization language, while YamlDotNet is a .NET library that helps us serialize and deserialize YAML data. Due to its simple and intuitive syntax, programming languages frequently use YAML for configuration...
Fastest Way to Get a Dictionary Key by Value in C#
The C# language does not provide a built-in method that we can use to retrieve a key from our dictionary using its value. However, using other features of the language, we can create methods to perform this task. In this article, let's implement and discuss several...
How to Show Query Parameters in Swagger in ASP.NET Core
In the .NET ecosystem, Swagger is a common way to define and document our APIs. In this article, we will look at how to show query parameters in Swagger. [sc name="github"...
Generate Images in C# Using SkiaSharp
In this article, we will learn about generating images in C# using SkiaSharp. Let's dive in. What is SkiaSharp? The SkiaSharp...
Generate Images in C# Using ImageSharp
In this article, we will learn about generating images in C# using ImageSharp. Let's get started. What is ImageSharp? ImageSharp...
Generate Images in C# Using ImageMagick
In this article, we will learn about generating images in C# using ImageMagick. Let's dive in. What is ImageMagick? ImageMagick...
Using Kafka in an ASP.NET Core Web API
At its core, Kafka is a distributed streaming platform designed to handle large volumes of data in real-time. Its exceptional performance, fault tolerance, and scalability make it a pivotal component in event-driven architectures. [sc name="github"...
Using Server-Sent Events for Realtime Updates in ASP.NET Core
In this article, we will talk about Server-Sent Events in ASP.NET Core. We will see what they are, their features, advantages, and implementation. [sc name="github"...
How to Create a Zip File in Memory In C#
In this article, we will look at how we create In-Memory Zip files in C#. Previously, we discussed how to create and read Zip files in .NET in our Working With Zip Files in C#/.NET article, so we recommend taking a look at that to familiarize yourself with working...
How to Show the Generated SQL Query in EF Core
Entity Framework Core has many useful features, and in this article, we will see how to use it to show a generated SQL query. EF Core is an open source Object-relational mapper that supports several databases like SQLite, PostgreSQL, MySQL, and also LINQ (Language...
HSTS Header Implementation in ASP.NET Core
In this article, we are going to learn how to implement the HSTS header in ASP.NET Core applications. So let's get going. What Is HSTS HTTP Strict...
How to Build a URL Shortener in .NET Applications
When working with URLs in our applications, there are times when they may become too long, clunky, unreadable, and difficult to use. In such situations, we can employ a URL shortener to make them shorter, more readable, and easier to share. Essentially, a URL...


