Code Maze Author

Code Maze

This is the standard author on the site. Most articles are published by individual authors, with their profiles, but when several authors have contributed, we publish collectively as a part of this profile.
Also find me here:



MY ARTICLES:

Compare Byte Arrays in .NET

In .NET, byte arrays are a common data type used to represent a sequence of bytes. They often represent binary data such as images, audio files, or serialized objects. Comparing byte arrays in .NET requires a good understanding of how the .NET framework handles arrays...

How to Integrate BenchmarkDotNet With Unit Tests

In this article, we will learn how to integrate BenchmarkDotNet with Unit Tests and use some advanced APIs of the BenchmarkDotNet library when doing that. In the .NET ecosystem, BenchmarkDotNet is the go-to library for conducting performance benchmarks. Typically we...

Converting a Byte Array to Hexadecimal String in C#

In this article, we will look at converting a byte array to a hexadecimal string. Converting between byte arrays and hexadecimal strings is a common occurrence in computer programming. Hexadecimal strings have the advantage of being both human-readable and easy to...

Roslyn Compiler and Analyzers in .NET – Introduction

In this article, we will introduce Roslyn compiler and analyzers in .NET. Moreover, we will delve into utilizing Roslyn to compile C# code and explore various types of Roslyn analyzers. Roslyn is an open-source compiler for C# and Visual Basic. Roslyn exposes a wide...

Easy Web Application Caching With Redis in C#

Started to improve the scalability of an Italian startup, Redis has emerged as a powerful solution for efficient and fast data storage and retrieval. With Redis, applications can achieve lightning-fast access to frequently used data enabling millions of requests per...

How To Parse String to DateTime in C#

In this article, we will discuss how to parse string representations of date and time to an equivalent DateTime value in C#. The available methods in the DateTime class include Parse(),  TryParse(), ParseExact()and TryParseExact(). These methods can parse a string to...

Test Data Generation With AutoFixture in .NET

In this article, we will explore how to automate test data generation, enhance productivity, improve test coverage, and reduce maintenance efforts with a single library called AutoFixture. [sc name="github"...

DateTime Calendars in C#

When working with dates, we must consider the fact that there are many different calendar systems worldwide. The default calendar used in C# DateTime operations is the Gregorian calendar, since it's the most popular system. However, there are situations where we may...

ArrayList in C#

In this article, we are going to learn about ArrayList. It is one of the collection types in C# that allows us a flexible option to store data. ...

Value Objects in C#

In this article, we are going to dive into a very interesting concept in domain-driven design: value objects. We will take a look at many aspects of value objects, what makes them useful, and discuss situations where they may not be appropriate. [sc name="github"...

Execute a PowerShell Script in C#

In this article, we’ll learn how to execute a PowerShell script in C# using the ProcessStartInfo class from System.Diagnostics namespace and PowerShell classes from the System.Management.Automation namespace, which is available in PowerShell.SDK. [sc name="github"...

Differences Between ExpandoObject, DynamicObject and dynamic

In C#,  the dynamic keyword, the ExpandoObject class, and the DynamicObject class, are the main approaches to working with dynamic objects. However, ExpandoObject and DynamicObject are often used interchangeably, so it can be quite difficult to distinguish them. In...

Working With Guid in C#

In the world of software development, maintaining data integrity and uniqueness is of utmost importance. One such unique identifier in C# is the Guid (Globally Unique Identifier) class. In this article, we will explore the Guid class in .NET, its features, and how we...

How to Get Class Name as String in C#

In our programming journey, there are times when we might find ourselves in a situation where we need to obtain the class name as a string. This proves beneficial for many reasons, such as logging, debugging, or other programming endeavors. In C#, there are different...

How to Add a Global Route Prefix in ASP.NET Core

In this article, we will learn how to add a global route prefix in ASP.NET Core. This enables us to effortlessly incorporate the route prefix into our application's routing mechanism, offering greater flexibility and control. [sc name="github"...

How to Read Values From Query Strings In ASP.NET Core

In this article, we are going to learn how to read values from query strings in ASP.NET Core. In web development, the capability to read and utilize values from the query string holds significant importance. It is crucial to adeptly interpret the parameters...

InProcess and OutOfProcess Hosting Models in ASP.NET Core

In this article, we will compare InProcess and OutOfProcess hosting models in ASP.NET Core and learn more about each hosting model. Hosting refers to deploying an application into the server for external access. Understanding the hosting process is essential in...

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"...