Menu

1 / 6

C# 15 Unpacked: Extension Indexers, or How to Teach Old Types New Tricks

DEV Community: dotnet·Giorgi Kobaidze·about 9 hours ago
#6vtOeJ6W
#devtodotnet#devto#dev#extension#indexer
Long article (1999 words) — no AI summary yet.
Reading 0:00
15s threshold

All the code in this series is available on GitHub. Clone it, run it, and try breaking it yourself.

.NET 11 & C# 15 Playground

A lightweight playground repository for experimenting with and testing new features introduced in .NET 11 and C# 15 .

Use it to explore language changes, try out APIs, and validate ideas in isolation without production constraints. Each feature lives in its own small project, often with a "before" and "after" version so you can see what the new feature actually changes.

What's inside

Project Feature Description

Unions Union types Console examples: the login flow (before and after unions), plus samples for parsing input, a state machine, user commands, and combining types you don't own.

UnionsWebApi Union types A minimal API that returns a union from a service and maps each outcome to an HTTP response.

ClosedHierarchies Closed hierarchies An order status modeled as an abstract record (before) and a closed record (after), so a switch over every subtype is exhaustive without a…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.