Virtual Methods in C#
In this article, we will discuss virtual methods in C#. We will define what they are and how we implement them. We will also mention virtual methods' uses, benefits, and drawbacks. [sc name="github"...
MY ARTICLES:
In this article, we will discuss virtual methods in C#. We will define what they are and how we implement them. We will also mention virtual methods' uses, benefits, and drawbacks. [sc name="github"...
Managed and unmanaged code are two types of code that differ in how they handle memory management. In this article, we'll explore the differences between managed and unmanaged code, focusing on garbage collection. [sc name="github"...
In this article, we will explore the pros and cons of using records with EF Core as model classes. We'll dive into what C# records are, how they differ from classes, and how they can be used as model classes in EF Core. [sc name="github"...
In this article, we'll look at setting up an SSL certificate for use in ASP.NET web applications and creating a new SSL certificate using Visual Studio and the .NET CLI. We'll also look at how to remove SSL certificates using the Windows certificate manager and the...
In this article, we will talk about Expression Trees in C#, how to use them, and see some of their applications. We'll also learn about their limitations and performance consideration. Although the topic may initially sound complex, it’s much simpler when we know a...
In this article, we are going to discover which anti-patterns fall into the class of code smells known as change preventers, as well as several approaches for refactoring them in C#. [sc name="github"...
In this article, we'll discuss the different ways to pass parameters to a GET request in ASP.NET Core. Before we dive into this topic, we...
Applications are becoming more complex and data-driven over time. Indeed, developing the ability to create and modify dynamic queries at runtime is becoming a critical skill for developers. In this article, we'll explore the basics of building dynamic query expression...
In this article, we will take a look at how to send emails with the SendGrid API directly from our code. Sending emails from within our applications is a common scenario that we face as developers. Let's look at a couple of use cases where we may need to do this. [sc...
In this article, we will focus on memory allocation optimization using BenchmarkDotNet. We will also learn how to effectively do that using the MemoryDiagnoser attribute while comparing two of the most popular sorting algorithms - QuickSort and MergeSort. [sc...
In this article, we are going to learn how to deploy an ASP.NET Core web application to the Ubuntu Linux server with Nginx. The introduction of .NET Core opened the cross-platform doors, allowing developers to build and deploy applications on Linux systems. At the...
In modern C# programming, we all strive for efficiency and top-notch performance. And when it comes to dealing with character data, converting a string to a span can be a game-changer. So, in this article, we'll dive into the process of converting a string to a span...
In this article, we will learn what Secure File Transfer Protocol is and how to use SFTP file upload to securely send files to a remote server in .NET and C#. [sc name="github"...
In this post, we are going to learn how to map DateOnly and TimeOnly types to SQL with migration. Let's dive in. DateOnly and TimeOnly Types...
In this article, we'll learn how to use System.Text.Json for camel case serialization in .NET 7. First, we'll take a glance at the default behavior when serializing. Then we'll use two different ways for the camel case serialization. Lastly, we'll discuss how we can...
In this article, we will explore the two popular libraries for generating OpenAPI documentation in C#: Swashbuckle and NSwag. We'll compare their features, ease of use, and other factors that will help us choose the best one for our projects. [sc name="github"...
In this article, we will discuss how we can initialize a string in C# and the recommended best practices to follow. We will explore different approaches and techniques that enable us to achieve proper initialization and efficient utilization of strings. [sc...
In this article, we are going to learn about object initializers in C#, which is a feature introduced in version 3.0 that simplifies code by eliminating the need to write multiple lines of code to initialize an object and its properties. [sc name="github"...
Reversing a string is a common task in programming, and C# provides several ways to accomplish it. Whether we need to reverse a string for sorting purposes, to improve search efficiency, or for any other reason, understanding how to perform this operation in C# is an...
In C#, several methods and operators are available to compare DateTime. In this article, we will learn about them along with the best practices. [sc name="github" url="https://github.com/CodeMazeBlog/CodeMazeGuides/tree/main/dotnet-datetime/CompareDateTimeInCSharp"...