Grant Winney
  • About
  • Coding 💻
  • Dev Life 🤓
  • Dev Questions ❓
  • Tech :: Inspired 🌱

C# 6.0  

Checking for null in C#, using the null-conditional and null-coalescing operators

Checking for null in C#, using the null-conditional and null-coalescing operators

Checking for nulls in C# is tedious, but C# 6 gave us the null-conditional and null-coalescing operators. Let's see how they've improved things.
Grant Winney Sep 26, 2022
Using string interpolation to craft readable strings in C#

Using string interpolation to craft readable strings in C#

The longer I write software, the more I come to appreciate clear code. String interpolation in C# is just one more way to help us do that.
Grant Winney Sep 19, 2022
Using nameof to avoid magic strings

Using nameof to avoid magic strings

There's a lot of ways to make our code work for us. Let's check out using the nameof operator to avoid magic strings.
Grant Winney Dec 29, 2021
How to include a DateTime format as a constant inside string interpolation

How to include a DateTime format as a constant inside string interpolation

I was upgrading some code to use string interpolation, a feature introduced in C# 6, when I ran into a small snag with DateTimes and a format string stored as a constant.
Grant Winney Apr 4, 2019

Let's learn together!

* indicates required
Send me new blog posts:

  • Contact
  • Privacy
  • License
  • Cross-Posting
Grant Winney © 2023. Powered by Ghost