.cs

4 claimants 3 primary 1 secondary shared primary (3)

SWH popularity

Distinct files in the full Software Heritage archive (2026-06-04 export), dated by first appearance, following Desmazières, Di Cosmo, Lorentz (MSR 2025). Case-aggregated. citation.

485.9M
total files
218.0M
first seen 2021–2025 (44.9%)
2020
median year (half its files since)

Case variants in archive: .cs (485.8M), .CS (22.3K), .Cs (2.0K), .cS (871) — aggregated above.

Attribution status

This extension is attributed to C Sharp (programming language); C#; csharp as primary by 5 authoritative claims.

Authoritative sources: ✓ Linguist ✓ Pygments ✓ Wikidata · Q2370 ✗ Wikipedia · no claim

Disagree or have a correction? Open a labelling issue.

Claimants (6)

Languages that list .cs among their extensions. Strength reflects whether the upstream source treated it as their primary extension.
LanguageSourceStrength
C Sharp (programming language)pygmentsprimary
C#linguistprimary
C#pygmentsprimary
C#wikidataprimary
csharppygmentsprimary
Smalltalklinguistsecondary

Wikidata says… (3)

File formats, image formats, audio codecs and other non-PL entities that claim .cs on Wikidata (property P1195) or in the Wikipedia infobox. Source: data/derived/external_extension_index.csv. Click Use as new PL on any row to open the Add-PL form pre-filled with that entry's name, Wikipedia/Wikidata URL, and this extension — one submission creates the PL + claim.
Right entry isn't listed? Add manually ↗
FormatClass (Wikidata P31)Suggested labelMIMENotesAction
C# source code file Q111431061
file format
file format—text/x-csharp—Use as new PL ↗
ColorSchemer Studio Color Scheme Q105849756
file format
file format———Use as new PL ↗
TorqueScript file Q128203989
file format
file format———Use as new PL ↗

Disambiguation rules (2)

Linguist heuristics that decide, by content, which language a .cs file actually is.
RulePredictsKindPredicates (truncated)Measured on SWH
h/linguist/.cs/0Smalltalkpredicates[{"kind": "any", "regexes": ["![\\w\\s]+methodsFor: "]}]
h/linguist/.cs/1C#predicates[{"kind": "any", "regexes": ["^\\s*(using\\s+[A-Z][\\s\\w.]+;|namespace\\s*[\\w\\.]+\\s*(\\{|;)|\\/\\/)"]}]

SWH-mined examples (0)

No archived examples for .cs in our local mirror yet.

Need an archived example for this extension?
No verbatim file with extension .cs in our local SWH mirror yet. Submit a sample-mining request and a maintainer will run swh_extension_mining.py against the live archive for this extension; samples land here once the run completes.
(or open the pre-filled issue directly)