<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/adding-static-getter-thanks-to-extensions-rvnhzsfwz" -->

---
title: Adding static getter thanks to extensions | daily.dev
description: C# 14 introduces extension blocks that can add static properties to existing types, not just instance methods. Using this feature, you can add a custom...
canonical: https://daily.dev/posts/adding-static-getter-thanks-to-extensions-rvnhzsfwz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Adding static getter thanks to extensions | daily.dev
og:description: C# 14 introduces extension blocks that can add static properties to existing types, not just instance methods. Using this feature, you can add a custom...
og:url: https://daily.dev/posts/adding-static-getter-thanks-to-extensions-rvnhzsfwz
og:image: https://api.daily.dev/og/posts/rvNHZsfwz.png
og:image:alt: Adding static getter thanks to extensions
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding static getter thanks to extensions

**[We Are .NET](https://daily.dev/sources/wearedotnet)** · 2 min read · 0 upvotes · 0 comments

## Summary

C# 14 introduces extension blocks that can add static properties to existing types, not just instance methods. Using this feature, you can add a custom NaturalSort comparer directly to StringComparer so it can be accessed as StringComparer.NaturalSort, matching the ergonomics of built-in comparers like StringComparer.OrdinalIgnoreCase. The post contrasts this with pre-C# 14 workarounds like extension methods or separate static classes, both of which feel awkward compared to the new syntax.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://steven-giesel.com/blogPost/605274d2-719b-4b1f-b0d5-3ad9001d9b56>

## Similar posts on daily.dev

- [Extension Properties: C\# 14’s Game-Changer for Cleaner Code](https://daily.dev/posts/extension-properties-c-14-s-game-changer-for-cleaner-code-aawdgf4pc) · Telerik · 0 upvotes · 0 comments
- [C\# Extension Members](https://daily.dev/posts/c-extension-members-1anekbztp) · JetBrains · 18 upvotes · 1 comments
- [The best new features of C\# 14](https://daily.dev/posts/the-best-new-features-of-c-14-6gsbbjwv4) · InfoWorld · 46 upvotes · 4 comments
- [Indexer extension members in C\# 15](https://daily.dev/posts/indexer-extension-members-in-c-15-yabwnagyx) · Damir's Corner · 17 upvotes · 2 comments

---

Tags: [#c#](https://daily.dev/tags/c#)

[View this post on daily.dev](https://daily.dev/posts/adding-static-getter-thanks-to-extensions-rvnhzsfwz)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Adding static getter thanks to extensions","url":"https://daily.dev/posts/adding-static-getter-thanks-to-extensions-rvnhzsfwz","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/adding-static-getter-thanks-to-extensions-rvnhzsfwz"},"datePublished":"2026-07-19T16:41:09.970Z","dateModified":"2026-07-19T16:41:27.743Z","description":"C# 14 introduces extension blocks that can add static properties to existing types, not just instance methods. Using this feature, you can add a custom...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c543ee24dacae6af65657c233ee767b3?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c543ee24dacae6af65657c233ee767b3?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"We Are .NET","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"We Are .NET","logo":"https://media.daily.dev/image/upload/s--BsnVOa3i--/f_auto/v1718347410/logos/wearedotnet","url":"https://daily.dev/sources/wearedotnet"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/adding-static-getter-thanks-to-extensions-rvnhzsfwz","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c#","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"We Are .NET","item":"https://daily.dev/sources/wearedotnet"},{"@type":"ListItem","position":3,"name":"Adding static getter thanks to extensions"}]}
```

