New Book Release! Rock Your Code: Coding Standards for Microsoft .NET

Announcing the 6th edition of my coding standards book for Microsoft .NET! Newly updated for .NET Core 3.1 and .NET Framework 4.8. This book is a compilation of common Microsoft .NET coding standards in use today. In the past, for languages like Visual Basic, Microsoft published coding standards in a single document that developers could … Continue reading New Book Release! Rock Your Code: Coding Standards for Microsoft .NET

Properly Setting Up .NET Core Projects

Visual Studio by default does not set all the appropriate options to help you write rock-solid .NET Core code. Below are the recommendations that your team should use for C# projects. All the following recommendations are for Visual Studio 2019. If you have an older version, most of this should still apply. To learn the … Continue reading Properly Setting Up .NET Core Projects

Properly Comparing Strings with Globalization and Performance in .NET

In Microsoft .NET there are many ways to compare strings. I would say that most of the code I analyze, I see it done one of these two ways: bool result = email1 == email2; bool result = email1.Equals(email2); Is this the best way to compare strings? The quick answer is no. While this works, … Continue reading Properly Comparing Strings with Globalization and Performance in .NET

Using the New IAsyncEnumerable Interface in .NET Core 3

The release of .NET Core 3 last month includes a brand new IAsyncEnumerable interface in the System.Collections.Generic namespace. The Microsoft documentation simply states: Exposes an enumerator that provides asynchronous iteration over values of a specified type.Microsoft Documentation This new interface sounds interesting, so I looked at the code in my open-source assembly to see if … Continue reading Using the New IAsyncEnumerable Interface in .NET Core 3

dotNetDave Rocks the Granite State Code Camp

For the first time, the dotNetDave 25th Anniversary World Tour is coming to the Granite State Code Camp in Manchester, NH on November 2nd! Even though I was born back east (Delaware), I don't think I have ever been to the state. If you live in the area, please let me know what I should … Continue reading dotNetDave Rocks the Granite State Code Camp

The New JSON Serializer in .NET Core 3

The release of .NET Core 3 last month introduces a brand new serializer for JavaScript Object Notation (JSON) under the System.Text.Json namespace. The Microsoft documentation states: The System.Text.Json namespace provides high-performance, low-allocating, and standards-compliant capabilities to process JavaScript Object Notation (JSON), which includes serializing objects to JSON text and deserializing JSON text to objects, with … Continue reading The New JSON Serializer in .NET Core 3