All Articles:

A case for NOT using Dependency Injection <gasp!>

DI is certainly a powerful design pattern. However not all projects are created equal, and the "right tool for the job" always applies. I've found one case for not using Dependency Injection.
4/5/2022

A simple .NET Core WebAPI DB connection string configuration

Typical .NET Core WebAPI apps heavily rely on dependency injection. For my simple WebAPI, this made DB connection strings more complicated than I preferred. Here's my solution.
4/4/2022

Where was [CallerArgumentExpression] when I needed it?

CallerArgumentExpressionAttribute can be used within functions to determine the original variable name of passed in arguments...would have been nice to have in .NET Framework 4!
1/25/2022

The if-cast-null-check feature for C#

I can't recall how many times I cast an object then checked for null on it prior to use. This feature would have been handy all these years!

1/13/2022

Gracefully handle null numerals with GetValueOrDefault()

When dealing with nullable numerals, GetValueOrDefault() can simplify code a bit.
11/22/2021

ASP.NET Core WebApi - Basic Authentication

Demonstrates adding basic authentication to an ASP.NET Core WebApi project.
6/25/2021

ASP.NET Core WebApi Json serialize as PascalCase

The default implementation of ASP.NET Core WebAPI serialization is camalCase. This creates a problem when trying to deserialize PascalCase based names. Here's the fix.
6/17/2021

String Compression

With incredibly fast processing speeds today, it's worth taking a small bit of processing time to compress & decompress large text. Obviously this can reduce storage space, but most importantly improves bandwidth. It's also rather easy to do.
6/2/2021

Null-Coalescing Assignment

Pretty simple: userRepository ??= new DefaultUserRepository();
5/27/2021

Xamarin: async calls to DisplayAlert

Calls to Xamarin's DisplayAlert are async. Calling await requires the calling function's signature to be async. Click event handlers are looking for non-async functions. Here's the work-around.
5/19/2021

C# 9 Favorites

C# 9 came out in 2020. Here are some of my favorite additions (and a few not-so-favorites).
4/20/2021

C# Functions - Returning multiple values with Tuple Literals

There are times when we need to return multiple values from a function. C#7 has a better way: Tuple types and Tuple literals
4/14/2021


  • C#/.NET
  • T-SQL
  • HTML/CSS
  • JavaScript/jQuery
  • .NET 8
  • ASP.NET/MVC
  • Xamarin/MAUI
  • WPF
  • Windows 11
  • SQL Server 20xx
  • Android
  • XBox
  • Arduino
  • Skiing
  • Rock Climbing
  • White water kayaking
  • Road Biking