How to Check if a String Ends With a Number in C#
Checking if a string ends with a number in C# is a very common operation. In this article, we are going to show various ways in which we can do this. [sc name="github"...
MY ARTICLES:
Checking if a string ends with a number in C# is a very common operation. In this article, we are going to show various ways in which we can do this. [sc name="github"...
The HashSet<T> and SortedSet<T> classes in the System.Collections.Generic namespace define two ways of storing and iterating over a collection of objects in C#. Both classes have pros and cons, so which one should we use? This article is going to compare...
In most applications, we query data from a source, a database, for instance, and perform operations on that data. For this, we use can use LINQ. However, when we want to unlock more powerful features of the C# language, we use the System.Linq.Dynamic.Core library. In...
In this article, we are going to learn about IDisposable objects and how to manage them in C#. While developing applications in C# or any...
In this article, we're going to learn about the using static directive feature in C#. Let's dive in. What Is a “using static” Directive? In...
In this article, we are going to learn about how we can return null from a generic method in C#. Let's start. Can We Return null From a...
In this article, we are going to find out what null-coalescing operator ?? and null-coalescing assignment ??= operators are and how to use them. [sc name="github" url="https://github.com/CodeMazeBlog/CodeMazeGuides/tree/main/csharp-operators/NullCoalescingOperator"...
A SortedSet in C# is a data structure that allows us to store and access elements in sorted order. In this article, we are going to explore how to create and use the SortedSet class in C#. We are also going to look at some of the benefits and drawbacks of using this...
In this article, we're going to learn how to use HTML Agility Pack in C# and review some examples of its most important features. ...
In this article, we are going to look at the main differences between Tasks and Threads. They are both used for concurrent programming, but Tasks were later introduced with .NET Framework 4. [sc name="github"...
Concurrent Collections in C# are a set of collections designed for synchronized multi-thread access. We can find concurrent collections under the System.Collections.Concurrent namespace. Nowadays, where it is getting increasingly important and accessible to work in a...
In this article, we are going to take a look at the HashSet class in C#. We will discuss how to use it and its key features. Also, we are going to see some examples of how to use it in practice. Finally, we'll compare it to other data structures available in C#. [sc...
Converting DataTable to JSON is one of those tasks that we come across from time to time and it seems like there should be a built-in method to do it. Unfortunately, that is not the case and we need to figure out a way to do it on our own. In this article, we will...
In this article, we are going to compare Dictionary and Hashtable in C#. We will start with a brief introduction to both data structures and then proceed to the comparison. [sc name="github"...
In this article, we are going to talk about constructor overloading in C#. We'll look at the different ways to implement it in an application. While we look at constructor overloading in this article, we have an existing article on constructors that can act as a...
In this article, we will learn how to use OData with ASP.NET Core Web API services. OData (Open Data Protocol) is an open protocol that defines a set of best practices for building and consuming RESTful APIs. Initiated by Microsoft in 2007, it has become an OASIS...
In this article, we are going to look at some common C# programming mistakes. We are pretty sure that there are a lot more mistakes that developers make while writing their projects, but here, we will try to summarize the ones we often noticed while working with other...
Making websites multi-lingual allows users from around the globe to use our applications in their native language. In this article, we are going to see how ASP.NET Core provides us with the ability to enable localization to support different languages and cultures. ...
In this article, we're going to take a look at how to make the first letter of a string upper case in C#. We'll see some different approaches and investigate their performance characteristics. By the end of this article, we should have a good understanding of which...
In this article, we are going to learn about one of the most common exceptions in C# - IndexOutOfRangeException. We're going to...