Latest Posts On Code Maze

How to Detect if a Key is Pressed in a C# Console Application

How to Detect if a Key is Pressed in a C# Console Application

We frequently read data from user input in our C# application. However, we sometimes need to detect a key press and continue the operation. In this article, we discuss how to detect if a key is pressed in a C# console application. By understanding the usage of these...

Code Maze Weekly #209

Code Maze Weekly #209

Issue #209 of the Code Maze weekly. Check out what's new this week and enjoy the read. .NET and C# Top Picks 6 Types of Constructors in C# [codingsonata.com] Let's go over the basics and see which constructors we have available in C# with Aram Tchekrekjian. Can you...

How to Test gRPC Services in ASP.NET Core

How to Test gRPC Services in ASP.NET Core

gRPC is a popular way to create fast and scalable API's in the .NET world. In this article, we explore how to test gRPC Services in .NET applications, and set up both unit and integration tests to ensure the reliability and performance of gRPC services. Here's something a bit different but important if you're into web development....

How to Validate a GUID in C#

How to Validate a GUID in C#

 In this article, we will explore several approaches to validate a string representation of a GUID in C#. So let's dive in. What Does...

Different Ways to Create a Generic List of Anonymous Types in C#

Different Ways to Create a Generic List of Anonymous Types in C#

Knowing how to manipulate complex datatypes such as Lists is crucial when storing and manipulating data in C#. Sometimes, we may want to incorporate versatility by not having to define explicit classes and create generic lists of anonymous types in C#. In this...

The Fastest Way to Remove the Last Character of a String

The Fastest Way to Remove the Last Character of a String

Creating and manipulating string objects can be useful when building applications. In the C# programming language, string objects contain text values stored as a sequential read-only collection of character objects. This means string objects are immutable and thus...

Code Maze Weekly #207

Code Maze Weekly #207

Issue #207 of the Code Maze weekly. Check out what's new this week and enjoy the read. .NET and C# Top Picks C# 12: Alias Any Type [www.thomasclaudiushuber.com] Aliasing types and namespaces has been around for the longest time. With C# that feature has been extended...

Fastest Way to Check if a List is in Order in C#

Fastest Way to Check if a List is in Order in C#

In this article, we'll examine different techniques to check whether or not a list is in order in C#. We'll begin by examining several techniques, including parallel processing. Finally, we'll run a series of benchmarks to help us choose which option fits best in our...

How to Get the HTML Content of a Web Page as a String in .NET

How to Get the HTML Content of a Web Page as a String in .NET

In this article, we will look into a comprehensive guide on how to get the HTML content of a web page as a string and how to parse the content retrieved. First things first, we'll learn how to retrieve HTML content as a string from the web using tools like HttpClient,...