Implement A Webhook Framework With ASP.NET Core

Implement A Webhook Framework With ASP.NET Core

Let’s say we’re building a brand new HTTP API that supports webhooks, and we want the best for our ASP.NET consumers. We should document elements like endpoints, payloads, authentication, and responses our API expects from consumers. Documentation can be overwhelming...

ExceptionDispatchInfo And Capturing Exceptions

ExceptionDispatchInfo And Capturing Exceptions

As long as there has been software, there have been bugs. Exceptions are a hierarchy of classes designed to help developers capture, inspect, and handle errors. For C# developers and many other languages, the way we work with exceptions is...

Module Initializers In C# 9

Module Initializers In C# 9

.NET 5 is shaping up to be an excellent release for .NET folks, and C# developers are fortunate to get more features to help solve day to day programming problems and niche optimizations. One of the features that caught my...

Looking At System.IO.Path

Looking At System.IO.Path

As a web developer, I rarely need to deal with physical files on disk. It’s a request/response kind of life while communicating with a database engine. When working on this blog, I find myself doing more file manipulation, as I’m...

Generate QR Codes With C#

Generate QR Codes With C#

Quick Response (QR) codes are all around us, helping us quickly retrieve information on our mobile devices. QR codes are high-density barcodes that encode all kinds of information: numbers, alphanumeric, byte/binary, and even script languages like Kanji.

FormattableStringFactory and Formats

FormattableStringFactory and Formats

In this post, we’ll be looking at FormattableStringFactory, a factory type used by .NET’s compilers to create instances of FormattableString. We can find the FormattableStringFactory class under the System.Runtime.CompilerServices namespace.

Implement Kotlin's withIndex in C#

Implement Kotlin's withIndex in C#

As a JetBrains Developer Advocate, I’ve become more exposed to other languages and technology stacks. Exposure is a good thing, as it allows me to see what the .NET ecosystem does well, and notice the parts where it could improve....

Ace Switch Expressions in C# 8

Ace Switch Expressions in C# 8

C# 8 came with many new features that make distinct logic branches more apparent for both the developers writing and reading the codebase. Those features include switch expression, property patterns, and tuple patterns.

Calculate the Moon Phase With C#

Calculate the Moon Phase With C#

Space: the final frontier. Or at least a topic all developers can enjoy. The most prominent heavenly body in the night sky is the Earth’s Moon, the only natural satellite the Earth has. The moon does many things; amongst them...

Serialize Interface Instances With System.Text.Json

Serialize Interface Instances With System.Text.Json

On the spectrum of “chill” languages, JavaScript is on the higher end of permissible syntax. The ability to patch together a disparate group of values and treat them as one collection can help developers “get stuff done”. C# and .NET...