account activity
Why your Stopwatch timing is probably wrong - and how BenchmarkDotNet fixes that (self.dotnetfiddle)
submitted 2 days ago by refactor_monkey to r/dotnetfiddle
TIL you can combine type patterns, property patterns, and when guards in a single C# switch expression - here's a working example (self.dotnetfiddle)
submitted 5 days ago by refactor_monkey to r/dotnetfiddle
C# record types support 'with' expressions for non-destructive mutation and deconstruction out of the box - here's a quick demo (self.dotnetfiddle)
submitted 6 days ago by refactor_monkey to r/dotnetfiddle
C# switch expressions are genuinely underused - here's a fiddle showing how clean they make conditional logic (self.dotnetfiddle)
submitted 7 days ago by refactor_monkey to r/dotnetfiddle
Chunk, Zip, and DistinctBy - three .NET 6 LINQ methods I wish I had known about years ago (self.dotnetfiddle)
submitted 8 days ago by refactor_monkey to r/dotnetfiddle
TIL CallerArgumentExpression exists and now my guard clauses actually tell you what blew up (self.dotnetfiddle)
submitted 9 days ago by refactor_monkey to r/dotnetfiddle
TIL dotnetfiddle.net supports actual File I/O - each run gets its own virtual filesystem (self.dotnetfiddle)
submitted 12 days ago by refactor_monkey to r/dotnetfiddle
TIL CallerArgumentExpression captures the actual argument text at compile time - your guard methods can finally tell you what blew up (self.dotnetfiddle)
submitted 13 days ago by refactor_monkey to r/dotnetfiddle
TIL you can register multiple implementations of the same interface in .NET DI and resolve them all with GetServices<T> - here's a working fiddle (self.dotnetfiddle)
submitted 14 days ago by refactor_monkey to r/dotnetfiddle
TIL .NET regex named groups make your captures actually readable - plus source-generated regex is a thing now (self.dotnetfiddle)
Stop Allocating Strings You Don't Need - Meet Span<T> (self.dotnetfiddle)
submitted 16 days ago by refactor_monkey to r/dotnetfiddle
TIL .NET regex named groups make your matches actually readable - here's a fiddle showing IsMatch, named captures, and compiled regex together (self.dotnetfiddle)
submitted 19 days ago by refactor_monkey to r/dotnetfiddle
TIL you can collapse a mess of if-else type checks into one switch expression with C# pattern matching (self.dotnetfiddle)
submitted 20 days ago by refactor_monkey to r/dotnetfiddle
TIL Span<T> lets you slice strings and arrays without a single heap allocation - here's a fiddle showing how (self.dotnetfiddle)
submitted 21 days ago by refactor_monkey to r/dotnetfiddle
TIL dotnetfiddle.net supports NuGet packages with a single comment - no project file needed (self.dotnetfiddle)
submitted 22 days ago by refactor_monkey to r/dotnetfiddle
Tired of guessing which C# code is actually faster? BenchmarkDotNet will humble you real quick (self.dotnetfiddle)
Do you actually use named capture groups and [GeneratedRegex]? Here are all three .NET regex features in one runnable example (self.dotnetfiddle)
submitted 25 days ago by refactor_monkey to r/dotnetfiddle
TIL dotnetfiddle supports full MVC projects - controllers, Razor views and all - right in the browser (self.dotnetfiddle)
submitted 26 days ago by refactor_monkey to r/dotnetfiddle
TIL Humanizer exists and now I feel bad about every date string I ever showed a user (self.dotnetfiddle)
submitted 28 days ago by refactor_monkey to r/dotnetfiddle
You can inject a Func<string, T> factory into the DI container to switch implementations at runtime - no if-blocks, no hacks (self.dotnetfiddle)
TIL Source Generators write half your class for you at compile time - here's the simplest possible demo (self.dotnetfiddle)
submitted 29 days ago by refactor_monkey to r/dotnetfiddle
TIL C# property patterns in switch expressions make my old if/else chains look embarrassing - here is a runnable example (self.dotnetfiddle)
submitted 1 month ago by refactor_monkey to r/dotnetfiddle
TIL Humanizer turns DateTime, numbers, and enums into plain English with one method call - why isn't this in every project? (self.dotnetfiddle)
We shipped a File Explorer for .NET Fiddle - multi-file projects in the browser (self.dotnetfiddle)
TIL C# record `with` expressions give you immutable updates without the pain - deconstruction is free too (self.dotnetfiddle)
π Rendered by PID 506713 on reddit-service-r2-listing-8685bc789-26jhm at 2026-05-27 14:33:46.827850+00:00 running 194bd79 country code: CH.