DateTime.UtcNow is significantly faster in .NET 6 compared to .NET 5. The performance improvement mainly comes from negating the regressions … Continue reading DateTime.UtcNow and DateTime.Now performance improvements in .NET 6
Category: .NET Core Blog
Consider using named arguments in C# to increase readability of method calls
By using named arguments in C# we don’t have to match the ordering of parameter lists of called methods. Instead the … Continue reading Consider using named arguments in C# to increase readability of method calls
Poll Results : Do you have a use case for CoreWCF?
CoreWCF is a port of WCF to .NET Core. It’s a community project but will be supported by Microsoft and … Continue reading Poll Results : Do you have a use case for CoreWCF?
.NET 7 to include new ThrowIfNullOrEmpty ArgumentException guard clause
In .NET 6 Microsoft introduced the ArgumentException.ThrowIfNull guard clause and in .NET 7 (Preview 4) they have introduced ArgumentException.ThrowIfNullOrEmpty. Using … Continue reading .NET 7 to include new ThrowIfNullOrEmpty ArgumentException guard clause
.NET 7 (Preview) available on Azure App Service as extension
.NET 7 will be released in November and as of the time of writing we are on Preview 5. If … Continue reading .NET 7 (Preview) available on Azure App Service as extension
System.Random is much faster in .NET 6 as Microsoft have changed underlying algorithm
In .NET 6 Microsoft have changed the algorithm used in System.Random and the performance improvements are crazy. Check out the … Continue reading System.Random is much faster in .NET 6 as Microsoft have changed underlying algorithm
Emojis will be supported in .NET 7 console output
In .NET 7 it will be possible to use emojis in console output. What do you think about this? Good? … Continue reading Emojis will be supported in .NET 7 console output
Microsoft drops parameter null checking operator from C#11
Looks like Microsoft have pulled the null check !! operator from C#11. It had been included in C# 11 early … Continue reading Microsoft drops parameter null checking operator from C#11
HTTP/2 performance improvements in .NET 7
In .NET 6 the built in Kestrel server controlled how HTTP/2 requests accessed a TCP connection via a lock, this … Continue reading HTTP/2 performance improvements in .NET 7
In .NET 7 we can choose not to use top level statements when creating new projects
Top level statements were introduced in .NET 6 to reduce ‘boilerplate’ code but not everyone likes them. In .NET 7 … Continue reading In .NET 7 we can choose not to use top level statements when creating new projects
HTTP/3 standardized as RFC 9114 and fully supported by .NET 6+
It was a big day for HTTP recently (early June 2022) as HTTP/3 was standardized as RFC 9114… Great to … Continue reading HTTP/3 standardized as RFC 9114 and fully supported by .NET 6+
Performance Improvements when Microsoft upgraded their Exchange Online POP3 windows service to .NET Core 3.1 from .NET Framework
Microsoft saw awesome improvements across several metrics including CPU time when they upgraded their Exchange Online POP3 windows service to … Continue reading Performance Improvements when Microsoft upgraded their Exchange Online POP3 windows service to .NET Core 3.1 from .NET Framework
.NET 6 performance improvements when comparing two arrays using SequenceEquals
There’s some pretty impressive performance improvements in .NET 6 when we are comparing arrays using the LINQ SequenceEqual method. The … Continue reading .NET 6 performance improvements when comparing two arrays using SequenceEquals
Amazing performance improvement in .NET 6 when creating one SortedDictionary from another
The performance improvements when cloning one SortedDictionary from another in .NET 6 compared to .NET 5 are amazing. I’m not … Continue reading Amazing performance improvement in .NET 6 when creating one SortedDictionary from another
ImmutableList performance improvements in .NET 6
Another small but welcome performance improvement in .NET 6 is with item retrieval times when using ImmutableList… It looks like … Continue reading ImmutableList performance improvements in .NET 6
Using declarations in C#8+ can allow us to dispose of resources correctly without increasing nesting levels
Since C#8 we can use single line using declarations which will allow us to dispose of resources at the end of … Continue reading Using declarations in C#8+ can allow us to dispose of resources correctly without increasing nesting levels
How to output the Ratio column when using BenchmarkDotNet
If you’re using BenchmarkDotNet and want to see how other methods compare against a baseline method, set the Baseline attribute … Continue reading How to output the Ratio column when using BenchmarkDotNet
Using aliases in C# to provide shorthand references to types or namespaces
In C# we can use aliases to provide shorthand references to types or namespaces. Aliases can be useful to tidy … Continue reading Using aliases in C# to provide shorthand references to types or namespaces
Declaring and setting multiple variables of the same type in the same statement in C#
Does anyone actually use this variation of declaring variables? I rarely see it. I think its possibly useful in instances … Continue reading Declaring and setting multiple variables of the same type in the same statement in C#
ToString() v nameof() performance comparison when getting a string value from a enum option
The benchmarks (originally published on LinkedIn) below from Guilherme Ferreira show’s that there’s a big performance difference between using ToString() and … Continue reading ToString() v nameof() performance comparison when getting a string value from a enum option
Breaking up long interpolated strings can impact performance in .NET 6
If you’ve created long strings using string interpolation ($) and hit enter to prevent horizontal scroll Visual Studio will + … Continue reading Breaking up long interpolated strings can impact performance in .NET 6
Set List<> initial capacity to improve speed
FYI… setting capacity on a List<> when creating it can avoid a lot of expensive resizing operations. Even if we … Continue reading Set List<> initial capacity to improve speed
How to create a project in Visual Studio to play around with new .NET 6 Minimal APIs
To play around with the new Minimal APIs in .NET 6 you can create a new project using the ‘ASP.NET … Continue reading How to create a project in Visual Studio to play around with new .NET 6 Minimal APIs
33% CPU utilization drop after Azure Active Directory gateway service upgraded to .NET 6
CPU utilization dropped by 33% after Azure Active Directory gateway service moved to .NET 6 recently…
In .NET 6 the ZIP LINQ extension can now support merging three sequences together
In .NET 6 the ZIP LINQ extension can be used to merge elements from three sequences together. Previously it was … Continue reading In .NET 6 the ZIP LINQ extension can now support merging three sequences together