Start Debugging

Daily notes on .NET, C#, EF Core, MAUI, Blazor, and Flutter - for developers who ship.

Why does string.GetHashCode() return a different value every run in .NET?

Since .NET Core, string.GetHashCode() is seeded with a random per-process value (Marvin hashing), so the same string hashes differently in every process. Why the runtime does it, which types are affected (HashCode.Combine, ValueTuple, records with string members), how Dictionary<string, T> quietly avoids the cost, and how to get a stable hash with XxHash3 or FNV-1a, verified on .NET 10.0.10.

Why is the first limiter in PartitionedRateLimiter.CreateChained called twice per request?

ChainedPartitionedRateLimiter walks each limiter once, but the ASP.NET Core rate limiting middleware calls the chain twice when the first pass fails: AttemptAcquire, then AcquireAsync. With fixed window or token bucket limiters a rejected request burns two permits from the first limiter, and a queued request does too. Reproduced on ASP.NET Core 10.0.10 and 11.0 RC3, with a wrapper that makes the middleware walk the chain once.
2026-11-05 dartflutterasync

Why does Future.delayed or a Timer fire later than the requested Duration in Dart?

A Dart Timer is a promise never to fire early, not a promise to fire on time. The VM truncates the Duration to whole milliseconds, adds one millisecond on purpose, and delivers the timer as an event that waits behind running code and every pending microtask. Measured lateness on Dart 3.12.2, periodic tick skipping, drift in chained delays, the 4 ms browser clamp, and the 30-day delay that fires instantly on the web.
Page 1 of 111 Next ›