Just for fun, I took benchmarks using BenchmarkDotNet to see what’s the fastest out of common ways used to concatenate … Continue reading .NET 8 simple string concatenation benchmarks
C# 11 list pattern examples
Beginning with C# 11, we can use list patterns to match elements of a list or array. Some examples of different types … Continue reading C# 11 list pattern examples
String.Equals with OrdinalIgnoreCase compared to ToLower / ToUpper for string insensitive comparisons in C#
In C#, when checking if strings are equal in a case insensitive way prefer string.Equals with OrdinalIgnoreCase over using ToLower() … Continue reading String.Equals with OrdinalIgnoreCase compared to ToLower / ToUpper for string insensitive comparisons in C#
String.Equals with OrdinalIgnoreCase faster in .NET 8 compared with .NET 7
There’s some awesome string comparison OrdinalIgnoreCase improvements coming in .NET 8, although I did see one regression too. Click on … Continue reading String.Equals with OrdinalIgnoreCase faster in .NET 8 compared with .NET 7
How to validate all benchmarked methods return the same value with BenchmarkDotNet
Instead of calling your benchmark methods outside the context of BenchmarkDotNet to validate they all return the same value, let … Continue reading How to validate all benchmarked methods return the same value with BenchmarkDotNet
How to order BenchmarkDotNet results from fastest to slowest
By default BenchmarkDotNet outputs the results of benchmarks as they are coded in the benchmark class file. If you wish … Continue reading How to order BenchmarkDotNet results from fastest to slowest
How to enable split queries globally in Entity Framework
The AsSplitQuery() method in Entity Framework is useful as it allows us to avoid cartesian explosion which can cause performance … Continue reading How to enable split queries globally in Entity Framework
Improved ASP.Net debugging in Visual Studio in .NET 8
.NET 8 Preview 5 was recently released and it includes improvements to ASP.NET debugging in Visual Studio. It looks like … Continue reading Improved ASP.Net debugging in Visual Studio in .NET 8
.NET 8 FrozenDictionary benchmarks
For those that don’t know Microsoft have introduced new FrozenDictionary and FrozenSet collections in .NET 8 (from Preview 1). These collections … Continue reading .NET 8 FrozenDictionary benchmarks
Creating pull requests directly in Visual Studio now supported
From Visual Studio 2022 17.7 Preview 2+ it’s now possible to CREATE PULL REQUESTS directly from within the IDE ❤ … Continue reading Creating pull requests directly in Visual Studio now supported
Consider C# 8 switch expressions to improve readability of existing switch statements
I generally don’t like too much ‘sugar’ being added to C# but Switch Expressions from C# 8 really can improve readability … Continue reading Consider C# 8 switch expressions to improve readability of existing switch statements
SOLID principles are not laws
I cringe every time I hear a dev say something is a ‘violation’ of one of the SOLID principles as … Continue reading SOLID principles are not laws
Use local functions in C# to encapsulate logic to a single calling method
💡 – Did you know we can use local functions in C# to scope logic only to their containing methods? … Continue reading Use local functions in C# to encapsulate logic to a single calling method
Use LINQ Intersect method to find common items in two collections in .NET
C# Tip 💡 ->Did you know LINQ Intersect can be used to find common items between two collections in .NET? … Continue reading Use LINQ Intersect method to find common items in two collections in .NET
Debug localhost APIs via remote URLs with Visual Studio Dev Tunnels
Have you used Dev Tunnels in Visual Studio yet? Devs tunnels allow us to expose (and debug) our localhost APIs … Continue reading Debug localhost APIs via remote URLs with Visual Studio Dev Tunnels
New Guard Clauses coming in .NET 8
New Guard Clauses coming in .NET 8 👇🏻 … .NET 6 and .NET 7 introduced a couple of Guard Clauses … Continue reading New Guard Clauses coming in .NET 8
Get method caller info in C# using info attributes
C# Tip 💡 – Did you know we can get info about the caller of a method using C# (5+) … Continue reading Get method caller info in C# using info attributes
Poll Results : Do you enable Nullable Reference Types in your C# 8+ .NET apps?
Nullable Reference Types are supported since C# 8 in .NET and allow us to minimize the likelihood that our code … Continue reading Poll Results : Do you enable Nullable Reference Types in your C# 8+ .NET apps?
NuGet website now allows filtering of packages by .NET target framework
FYI … the NuGet website now allows you to filter by .NET target frameworks. Useful? What do you think? You … Continue reading NuGet website now allows filtering of packages by .NET target framework
Treat Nullable references type warnings in C# 8+ as errors
To treat Nullable reference types (C# 8) warnings as errors to ensure they aren’t just ignored add line 7 below … Continue reading Treat Nullable references type warnings in C# 8+ as errors
What’s new in Entity Framework 8 Preview 1?
There’s lots of good stuff coming in Entity Framework 8 Preview 1 which should drop within the next week or … Continue reading What’s new in Entity Framework 8 Preview 1?
How to set C# 10+ file scoped namespaces as default in Visual Studio
If you’re using Visual Studio 2022 & want to use File-scoped namespaces (C# 10+) by default when you create a … Continue reading How to set C# 10+ file scoped namespaces as default in Visual Studio
Resume driven development is a big problem in the software development sector
Unfortunately I see this ‘Architecture by CV‘ or ‘Resume driven development‘ as Cory has called it kind of thing all … Continue reading Resume driven development is a big problem in the software development sector
Redesigned Azure App service scale up plan screen
Has anyone seen the new Azure APP SERVICE scale up plan screen? It’s a pretty big UX improvement I think … Continue reading Redesigned Azure App service scale up plan screen
Poll Results : Do you use Microsoft-hosted agents or self-hosted agents with Azure DevOps
In work we are considering switching to self-hosted agents for our build pipelines in Azure DevOps as the Microsoft hosted … Continue reading Poll Results : Do you use Microsoft-hosted agents or self-hosted agents with Azure DevOps