C# Tip: use Miniprofiler instead of Stopwatch to profile code performance 2022-09-13 2 min read CSharp Tips Miniprofiler is a nice tool to profile your code in a smart way. Continue reading
C# Tip: SelectMany in LINQ 2022-07-12 2 min read CSharp Tips SelectMany is one of the LINQ methods I’ve used the least. I couldn’t get it! Turns out it was actually incredibly simple. Continue reading
C# Tip: use IHttpClientFactory to generate HttpClient instances 2022-06-07 2 min read CSharp Tips Initializing HttpClient instances can expose you to Socket Exhaustion problems. You should use IHttpClientFactory instead Continue reading
C# Tip: Convert ExpandoObjects to IDictionary 2022-05-10 2 min read CSharp Tips How to get all the keys of an ExpandoObject? Convert it to Dictionary! Continue reading
C# Tip: Use Debug-Assert to break the debugging flow if a condition fails 2022-04-05 2 min read CSharp Tips It would be great if we could break the debugging flow if a condition is (not) met. Can we? Of course! Continue reading
C# Tip: How to temporarily change the CurrentCulture 2022-03-08 2 min read CSharp Tips What can you do if you need to temporarily change the CurrentCulture in C#? Continue reading
C# Tip: Exception handling with WHEN clause 2022-02-08 2 min read CSharp Tips Instead of using if-else or switch blocks to handle exceptions, you can do it gracefully using the ‘when’ keyword. Continue reading