Speed Up Logging in .NET 6

In a recent article, I wrote and demonstrated how to speed up logging using LoggerMessage in .NET. Not long after I wrote that article, I learned of an even faster way to log using .NET 6. This article will show you how you can use this new way of logging and show the results of benchmark tests.

Coding Faster with dotNetTips Spargine 6: Benchmarking Your Code

Benchmarking is the process of measuring and baselining the performance of your code. It helps identify bottlenecks in comparing the performance of different algorithms or approaches that target the same set of problems and choosing the one that has optimal time and memory consumption. There are many ways to code the same thing in .NET, so how do you know which one is more performant? There can be big differences that not only affect performance but memory too. This article describes how I use BenchmarkDotNet to benchmark my code.

Coding Faster with dotNetTips Spargine 6: Validating Data Made Easy

In this article, I’m going to discuss new extension methods and show examples for validating data. In much of the code we write, we validate the state of a variable. In many cases, we use this to change program flow. These methods that I will describe make this very easy along with some added features.

Coding Faster with dotNetTips Spargine 6: Validating Arguments Made Easy

For my work moving Spargine to .NET 6, I have completely rewritten the Spargine methods to validate method parameters. In this release, these methods have been changed to allow fluent validation.

Speed Up Logging in .NET

The team at Microsoft has added another way to do logging that touts that it’s faster than using the old new way (ILogger). In this article, I will discuss the old way of logging and introduce the new LoggerMessage class. Updated January 2023.

Rockin’ The Code World with dotNetDave – Guest: Richard Campbell

Join me live on Saturday, March 5th at 10:00 PST on C# Corner Live for show #50 where my guest will be Richard Campbel, Co-host of .NET Rocks, host of RunAs Radio, chair of the Humanitarian Toolbox charity. 

Coding Faster with dotNetTips Spargine – January 2022 Release

I am happy to announce the fifth release (v2022.1.5.40) of Spargine on January 1st, 2022, my open-source projects, and NuGet packages for .NET 5 and above. I have added new classes, methods, benchmarks, and unit tests! I use these in all the projects I am currently working on including many that are in production! I hope you will check them out and let me know what you would like to see added.

Randomizing A Collection: One Time or Forever

Learn how to randomly choose items from a collection that can loop forever.

String Performance: The Fastest Way to Get a String’s Length

The article highlights the importance of using efficient methods for checking if a string is empty or null, emphasizing the performance benefits and exception prevention of using `string.IsNullOrEmpty()` and `string.IsNullOrWhiteSpace()` over the traditional `if (emailAddress == "")` approach. Benchmark results reveal that using null and `string.Empty()` is the most performant way to check for an empty string, with other methods showing similar performance levels. Updated January 2024.

Coding Faster with dotNetTips Spargine – September 2021 Release

I am happy to announce the fourth release (v2021.9.4.23) of Spargine, my brand new open-source projects, and NuGet packages for .NET 5 and above. I have added new classes, methods, and unit tests!