Category: .NET

The ‘Elegant-Innovative-Excellence’ of C#

Why C# Should Be Part of Your Tooling Arsenal C# (pronounced C Sharp) is a language used in combination with Microsoft’s .NET framework for developing applications. “The open-sourced nature of C# and the framework that comes with it is pretty unique,” Mark Michaelis said during a recent interview on Code Chat. “What really makes C# […]

5 Steps to Getting Started With Material Design In XAML

Add Aesthetically Appealing Material Design to Your Windows Presentation Framework Applications Material Design In XAML (MDIX) is a beautiful theme library that brings Google’s Material Design to your Windows Presentation Framework (WPF) applications. In this tutorial, we look at how easy it is to get started and add some beautiful material design to your application. […]

Tuple Trouble: Why C# Tuples Get to Break Guidelines

Trouble With Tuples Back in the August 2017 issue of MSDN Magazine I wrote an in-depth article on C# 7.0 and its support for tuples ( At the time I glossed over the fact that the tuple type introduced with C# 7.0 (internally of type ValueTuple<…>) breaks several guidelines of a well-structured value type, namely: […]

PowerShell Write-Error Without Writing Stack Trace

Trouble Shooting Errors Recently, I was trying to display the errors and warning from a DotNet Build. While the warnings all displayed correctly, the errors always included the stack trace: I was able to control the error output slightly by varying the global $ErrorView variable, but the only two options were NormalView or CategoryView, neither of […]

Interfacing With Multithreading Patterns Prior to TPL and C# 5.0

Legacy Version of C# Multithreading Multithreading patterns are used to address the multithreading complexities of monitoring an asynchronous operation, thread pooling, avoiding deadlocks, and implementing atomicity and synchronization across operations and data access. This is a thorough blog that combs through all you’d need to know about multithreading if you were working in a legacy […]

Using Tuples for Overriding Equality and GetHashCode

Overriding Objects The implementation of Equals() and GetHashCode() used to be complex, but with C# 7.0 Tuples, the actual code is boilerplate. For Equals(): It’s necessary to compare all the contained identifying data structures while avoiding infinite recursion or null reference exceptions. For GetHashCode(): It’s necessary to combine the unique hash code of each of […]

Essential .NET: C# 8.0 and Nullable Reference Types

Nullable Reference Types Overview Nullable reference types—what? Aren’t all reference types nullable? I love C# and I find the careful language design fantastic. Nonetheless, as it currently stands, and even after 7 versions of C#, we still don’t have a perfect language. By that I mean that while it’s reasonable to expect there will likely […]

Timers Prior to Async/Await Pattern of C# 5.0

There Are Multiple Ways to Use Task.Delay() When a Timer is Required For scenarios prior to .NET 4.5, several timer classes are available, including System.Windows.Forms.Timer, System.Timers.Timer, and System.Threading.Timer. The development team designed System.Windows.Forms.Timer specifically for use within a rich client user interface. Programmers can drag it onto a form as a non visual control and […]

Master the Basics of MVVM to Simplify Building WPF Applications

Getting Started: Model-View-ViewModel Pattern using Windows Presentation Framework Estimated reading time: 9 minutes The Windows Presentation Framework (WPF) takes full advantage of the Model-View-ViewModel (MVVM) pattern. Though it is possible to create WPF applications without using the MVVM pattern, a little investment in learning can make building WPF applications much simpler. If you are just […]