Home New Trending Search
About Privacy Terms
Posts
's posts

Stop using OrderBy(x => Guid.NewGuid()) to shuffle arrays

In .NET 8+, Random.Shared.Shuffle() is the native, zero-allocation way to handle it. Faster, cleaner, and built-in. #dotnet #csharp

8 hours ago 2 1 0 0
Post image

Converting human-readable durations to ISO 8601 format in C#. Handles "2.5 hours" → "PT2H30M", "3 days" → "P3D". Perfect for Schema course durations, video metadata, or API responses that need proper duration formatting #csharp

1 day ago 2 0 0 0
Post image

Simple extension to validate absolute URLs vs relative paths. The file scheme check prevents false positives from file:// URIs on Linux systems.#csharp #dotnet #webdev

2 days ago 1 0 0 0

I have been using keyset pagination in EF Core for our larger tables and the speed difference is undeniable. Offset pagination is fine for small sets where you need to jump to a specific page. But for high volume data where you just go next or back keyset is much more stable and fast
#dotnet #efcore

3 days ago 0 0 0 0
Post image

Migrating to .net Core Identity without forcing password resets?
Use a FallbackPasswordHasher which extends PasswordHasher<TUser> to
> Verify legacy HMACSHA512 hashes
> Return SuccessRehashNeeded for auto-upgrade
> Seamlessly migrate users on next login
No need to reset passwords

4 days ago 0 0 1 0
Post image

Found something cool today. You can just do this now in C# 14.

You can use the null-conditional operator on the left side of an assignment. Writing instance?.Property = value is perfectly valid in .NET 10.

No more null checks.

#dotnet #csharp

5 days ago 1 0 0 0

I will admit it: I am late to the Microsoft Applied Skills party.

But the shift in 2026 is undeniable. No more multiple choice guessing. You get a live lab environment and a clock.

Lab based validation beats theory every single time.

#dotnet #azure #ai #learning

6 days ago 0 0 0 0
Post image

Stop letting your JSON serializer dictate your object's design.

Using a private [JsonConstructor] + a Static Factory method ensures your domain objects stay valid while keeping the serializer happy.

Encapsulation > Public everything.

#dotnet #csharp #programming #clean-code

1 week ago 2 0 0 0
Post image

Got two implementations of the same service and getting annoyed by having to redeploy to switch them?
In .NET 10, the Strategy Pattern + DI is the fix. Resolve implementations via config for:
✅ Environment Agility
✅ Zero-code Migrations
✅ Instant Failover

🛠️ #dotnet #csharp

1 week ago 0 0 0 0

The 2026 dev workflow is wild. 🤯

> Clicked "Create PR in GitHub" from an Azure Board item.
> It auto-created the branch with all the ticket context.
> GitHub Copilot Agent took over and implemented the feature with 0 extra input.

#dotnet #ai #copilot

1 week ago 1 0 0 0

Looks interesting!

1 week ago 0 0 0 0

Stop rewriting AI logic twice. 🐍 + 🟦

Did you know you can run Python natively in .NET 10? Use NumPy or PyTorch directly in C# for AI heavy lifting without slow REST services.
Microservice or inline interop what’s your production strategy?
#dotnet #python #ai

1 week ago 0 0 0 0

First "200 OK" from any API feels good, but from Anthropic it’s a step forward.
Testing Claude 4.6 in Postman—linking a function app to an agent. Latency on the new adaptive thinking headers is low. Perfect for .NET workflows.
HttpClient or the SDK for prod?
#dotnet #ai #claude

1 week ago 2 0 1 0
@stuartgreig.dev
3 Followers 3 Following 13 Posts
Posts Following