📅 Week 48
Writing A Windows-only method-level attribute for xUnit in C# & .NET
[C#, .NET, xUnit]
Yesterday’s post, “Writing Operating Specific Test Assertion For xUnit In C# & .NET”, discussed how to write an assertion that runs only under a specific condition: the operating system is Windows.
Writing Operating Specific Test Assertion For xUnit In C# & .NET
[C#, .NET, Testing, xUnit]
As I have mentioned before, my development environment is as follows:
📅 Week 47
Beware - ParseExact Over Parse When Processing Dates In C# & .NET
[C#, .NET]
Parsing data to convert to types is always going to be a minefield.
How To Flatten Aggregate Exceptions In C# & .NET
[C#, .NET]
In a previous post, “How To Deal With Aggregate Exceptions In C# & .NET”, we looked at how to deal with AggregateExceptions.
How To Deal With Nested Exceptions In C# & .NET
[C#, .NET]
In yesterday’s post, “How To Deal With Aggregate Exceptions In C# & .NET”, we looked at how to deal with AggregateExceptions that may be thrown by the runtime.
How To Deal With Aggregate Exceptions In C# & .NET
[C#, .NET]
When dealing with exceptions, which are generally a state that are unexpected or legitimate, we typically handle them in a try-catch block as follows:
How To Get The PowerShell Edition
[PowerShell]
Yesterday’s post, “How To Get The PowerShell Version”, discussed how to get the PowerShell version that you are running under.
How To Get The PowerShell Version
[PowerShell]
A scenario you might run into is when you want to check the PowerShell version under which you are running.
How To Get An Available TCP Port From The Operating System In C# & .NET
[C#, .NET, Networking]
If you ever find yourself needing to write a network server application, an issue you will quickly face is finding an available port.
📅 Week 46
How To Execute Database Queries In Parallel In C# & .NET
[C#, .NET, Database]
Yesterday’s post, “Beware - Parallel.ForEach And Async Don’t Play Well Together”, discussed the predicament I ran into when incorrectly running async code using Parallel.ForEach, which ran the code synchronously anyway.
Beware - Parallel.ForEach And Async Don't Play Well Together
[C#, .NET, Beware, Database]
I was recently troubleshooting some database interfacing code that would persistently throw an error to the effect that I had run out of SQL Server connections.
How To Serialize Numbers As Strings Using System.Text.Json In C# & .NET
[C#, .NET, Json]
Yesterday’s post, “How To Deserialize Numbers Serialized As Strings Using System.Text.Json In C# & .NET”, looked at a possible scenario of how to deserialize numbers encoded as strings, in situations where you are not in control of your Json input.
How To Deserialize Numbers Serialized As Strings Using System.Text.Json In C# & .NET
[C#, .NET, Json]
Encoding and decoding of Json is largely a transparent task, regardless of the serialization library you use - typically (and recommended!) System.Text.Json.
Using StringSplitOptions.TrimEntries To Split Strings In C# & .NET
[C#, .NET]
In a previous post, “Splitting A String Into An Array In C# & .NET”, we looked at how to split astring into an array with the String.Split method.
C# 14, .NET 10 & Visual Studio 2026 Are Released
[C#, .NET]
After a year in development, the next version of .NET, .NET 10, is out, as well as Visual Studio 2026.
📅 Archives ...