Difference Between int.Parse() and Convert.ToInt32() in C#
In this article, we are going to talk about the difference between int.Parse() and Convert.Toint32(). Both the int.Parse() and the Convert.ToInt32() methods are used to convert a string to an integer. Although the two methods are used for the same purpose, there are,...
DateTime Operators in C#
Manipulating DateTime values is one of the most common operations in a lot of applications. In this article, we are going to learn about the DateTime operators in C# that can come in handy when manipulating DateTime values in .NET (Core). To...
Top-Level Statements in C#
In this article, we are going to learn about the top-level statements in C#. Whenever we start learning a new programming language, the first thing we write is usually a "Hello World" statement. And if we are talking about C#, there's a lot of required code we need to...
Parse and TryParse in C#
Often, our applications depend on external data sources that provide the string representations of .NET types. We have an option of using the Parse and TryParse methods to convert these string representations back to the base .NET types. The strings can be of any...
Code Maze Weekly #110
Issue #110 of the Code Maze weekly. Check out what's new this week and enjoy the read. .NET and C# How to send recurring emails in C# .NET using SendGrid and Quartz.NET [swimburger.net] If you need to send recurring mains in .NET, using Twilio SendGrid and Quartz.NET...
How to Create and Publish a NuGet Package with .NET CLI
In this article, we are going to talk about how to create and publish a NuGet package from .NET Class Library using .NET CLI. Let's get going. NuGet Workflow...
Convert DateTime to ISO 8601 String in C#
In this article, we are going to learn how to convert DateTime to ISO 8601 string in C#. There are various formats of ISO 8601 compliant date and time strings. We are going to build a console application and explore all these different formats. To...
ILogger, ILoggerFactory, and ILoggerProvider in .NET
In this article, we are going to discuss how we can use the logging API in a .NET application and the three important interfaces of this API - ILogger, ILoggerFactory, and ILoggerProvider. Logging is an important part of every application. It helps us identify the...
Catch Multiple Exceptions in C#
In this article, we are going to learn about different ways to catch multiple exceptions in C#. Utilizing try-catch block is the best way to manage exceptions. It also enables developers to manage exceptions however they want. Using a single catch block is one of the...
Serializing Objects to XML in C#
In this post, we are going to learn about serializing objects to XML in C#. So, what is XML Serialization? It is the transformation of the public fields and property values of an object (without type information) into an XML stream. To download...
Break and Continue Statements in C#
In C#, we use the break and continue statements to control the flow of iterations in our code. Both commands help us to stop an iteration of our code. While the break statement stops an iteration and "breaks" out from the entire parent loop in which it appears, the...
How to Convert String from Title Case to camelCase in C#
In this article, we are going to learn how to convert a string from Title Case to camelCase in C#. Let's start. Initial String Conversion from Title Case to...
Required Query String Parameters in ASP.NET Core
In this article, we’re going to talk about the required query string parameters. We are going to learn how to make query string parameters mandatory and explore the options we have in ASP.NET Core. To download the source code for this article, you...
Code Maze Weekly #109
Issue #109 of the Code Maze weekly. Check out what's new this week and enjoy the read. .NET and C# Using HTTP/3 (QUIC) in .NET [www.meziantou.net] Is it worth supporting HTTP/3 in our applications? How much better is it really? How do we implement it in .NET? Find...
Selection Sort in C#
Sorting is one of the most common problems that programmers solve while building applications. Selection sort is one of the algorithms that we can use to sort elements in an array. We are going to learn how to implement selection sort in C# and analyze how the...
Tuple in C#
In this article, we are going to deconstruct the concept of Tuple in C#. Let's dive in. What is Tuple in C# Tuple in C# is a reference-type data structure that...
API Versioning in ASP.NET Core
In this article, we’re going to talk about API versioning and explore the options we have in ASP.NET Core. So, let's start. Awesome series to start the New Year with. Multi-tenant...