DevDealRadar
Home › Dev Tooling › C# 15 Closed Hierarchies: Sealed-by-Default Class Clubs

C# 15 Closed Hierarchies: Sealed-by-Default Class Clubs

C# 15 adds closed hierarchies to limit subclassing to the defining assembly, improving API safety and exhaustive pattern matching.

Nov 28, 2026 source: DEV.to topic: Dev Tooling
Affiliate disclosure: this page may contain referral/affiliate links. If you sign up through them we may earn a commission or credit — at no extra cost to you.

Radar snapshot

4/10
Business model
6/10
Indie-hacker fit
22
DEV reactions

The feature has no standalone business model, but it is useful for indie library and framework authors who ship public C# APIs. It is less relevant to solo builders working on apps rather than reusable components. How we score

Business breakdown

There is no direct monetization; the value flows to Microsoft's .NET ecosystem, IDE vendors, and enterprise tooling. Target users are C# library authors and platform teams that need controlled extensibility without fully sealing types. Market opportunity is ecosystem stickiness and paid developer tooling, not the language feature itself.

Use it if…

C# library and framework authors who need controlled extensibility without fully sealing public base classes.

Skip it if…

Developers outside .NET or those building plugin systems that require external assemblies to subclass core types.

Alternatives & competitors

OptionPositioningPricing
C# sealed classesSealed blocks all inheritance, while closed hierarchies allow subclassing only within the defining assembly.Free language feature
Java sealed classes and interfacesJava uses explicit permits clauses; C# closed hierarchies use assembly-scoped closure for a simpler default.Free language feature

What an indie dev can do with this

  1. Prototype a small internal library with one public base class marked closed and test external inheritance failures.
  2. Replace fragile sealed-plus-internal-constructor patterns where exhaustive matching and controlled extension matter.
  3. Document the allowed subclass set for consumers and add analyzer or test coverage for external inheritance attempts.

FAQ

Is C# 15 closed hierarchies available in stable .NET?
It is a preview feature in C# 15; check the .NET preview SDK and enable the matching language version.
Does it replace sealed classes?
No. Sealed blocks all inheritance; closed restricts subclassing to the same assembly, so use it for controlled extension points.
Can external plugins subclass a closed class?
No, external assemblies cannot inherit from it; expose interfaces or explicit extension points for plugin scenarios.

Tags

#library #devtools #backend

Related intel

Original: dev.to (DEV.to) · This summary is algorithmically compiled and may contain errors — always check the source. Published Nov 28, 2026.