C#
1 program
Added 2025-10-22T16:38:39Z
Model: google/gemini-2.5-proTemp: 0.4
Evidence
Report issue
View issues
Aliases: csharp, c#, cs, C Sharp (programming language)
Provenance: commit 3c0274cf11 · authored 2025-10-22T18:38:39+02:00 · model google/gemini-2.5-pro
Merged records (4)
Sources describe this language in separate records, kept as they are. They were
joined by explicit decisions in data/curated/pl_links.csv
(concept concept/repo/C#); names of merged pages are listed as aliases above.
- C#
repo/C#· this page · primary · sources: llm-campaign · evidenceL-dfb4be0de0same_aspl/c-sharp-programming-language: accepted (generic-qualifier, claude-opus-5-5, 2026-09-30) - C Sharp (programming language)
pl/c-sharp-programming-language· had its own page, merged here · sources: hyperpolyglot, pygments, wikipedia · Wikipedia · Q2370L-470cfc8573same_aspl/csharp: accepted (generic-qualifier, claude-opus-5-5, 2026-09-30) — Esolang page 'C♯' describes Microsoft C# (checked 2026-09-30).L-916795fb2fsame_aspl/csharp-2: accepted (generic-qualifier, claude-opus-5-5, 2026-09-30)L-dfb4be0de0same_asrepo/C#: accepted (generic-qualifier, claude-opus-5-5, 2026-09-30) - C#
pl/csharp· record without its own page · sources: esolang, hyperpolyglot, linguist, pygments, rosettacode · Wikipedia · Q2370 · EsolangL-470cfc8573same_aspl/c-sharp-programming-language: accepted (generic-qualifier, claude-opus-5-5, 2026-09-30) — Esolang page 'C♯' describes Microsoft C# (checked 2026-09-30). - csharp
pl/csharp-2· had its own page, merged here · sources: hyperpolyglot, pldb, pygments · Wikipedia · Q2370 · PLDBL-916795fb2fsame_aspl/c-sharp-programming-language: accepted (generic-qualifier, claude-opus-5-5, 2026-09-30)
Sources mentioning this language
8 sources · pl_id:
pl/csharpWikipedia infobox ↗
Pulled from the
wikimedia/structured-wikipedia
snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and
pl_fact.csv for the long-table provenance.
| Paradigms | multi-paradigm: structured · imperative · object-oriented · event-driven · task-driven · functional · generic · reflective · concurrent |
|---|---|
| Typing | static, dynamic, strong, safe, nominative, partly inferred |
| Designed by | Mads Torgersen (Microsoft) · Anders Hejlsberg (Microsoft) |
| First appeared | 2000 |
| Influenced by | C++ · Cω · Eiffel · F# · Haskell · Scala · Icon · J# · J++ · Java · JavaScript · ML · Modula-3 · Object Pascal · Visual Basic (VB) |
| License | Roslyn compiler: MIT/X11 |
| Homepage | https://learn.microsoft.com/en-us/dotnet/csharp/ |
Extensions claimed by this language
7 claims. Each row is one upstream assertion with its strength.
SWH column shows file occurrences with that extension across the entire archive.| Extension | Source | Strength | SWH |
|---|---|---|---|
.cs | linguist | primary | 485.9M files |
.cs | pygments | primary | 485.9M files |
.cs | wikidata | primary | 485.9M files |
.csx | wikidata | primary | 72.5K files |
.cake | linguist | secondary | 84.2K files |
.csx | linguist | secondary | 72.5K files |
.linq | linguist | secondary | 58.8K files |
Related languages
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
ResizeSize Model for PowerToys ImageResizer
Provenance: commit 3c0274cf11 · authored 2025-10-22T18:38:39+02:00 · model google/gemini-2.5-pro · Temp 0.4
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Globalization;
using System.Text.Json.Serialization;
using System.Windows;
using ImageResizer.Properties;
using ImageResizer.Utilities;
namespace ImageResizer.Models
{
public class ResizeSize
{
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("width")]
public double Width { get; set; }
[JsonPropertyName("height")]
public double Height { get; set; }
[JsonPropertyName("unit")]
public ResizeUnit Unit { get; set; }
[JsonPropertyName("fit")]
public ResizeFit Fit { get; set; }
[JsonIgnore]
public string Description
{
get
{
string unit = Unit switch
{
ResizeUnit.Centimeter => Resources.Centimeter,
ResizeUnit.Inch => Resources.Inch,
ResizeUnit.Percent => Resources.Percent,
_ => Resources.Pixel,
};
string fit = Fit switch
{
ResizeFit.Fill => Resources.Fill,
ResizeFit.Fit => Resources.Fit,
_ => Resources.Stretch,
};
return string.Format(
CultureInfo.CurrentCulture,
"{0} ({1})",
string.Format(
CultureInfo.CurrentCulture,
"{0} x {1} {2}",
Width,
Height,
unit),
fit);
}
}
public Size GetPixelSize(int originalWidth, int originalHeight)
{
double width = 0;
double height = 0;
if (Unit == ResizeUnit.Percent)
{
width = originalWidth * Width / 100;
height = originalHeight * Height / 100;
}
else
{
width = UnitConverter.ConvertToPixels(Width, Unit);
height = UnitConverter.ConvertToPixels(Height, Unit);
}
if (Fit == ResizeFit.Fit)
{
double ratio = Math.Min(width / originalWidth, height / originalHeight);
width = originalWidth * ratio;
height = originalHeight * ratio;
}
else if (Fit == ResizeFit.Fill)
{
double ratio = Math.Max(width / originalWidth, height / originalHeight);
width = originalWidth * ratio;
height = originalHeight * ratio;
}
return new Size(Math.Max(1, width), Math.Max(1, height));
}
}
}
Disambiguation rules
Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
| Rule | Ext | Kind | Predicates (truncated) |
|---|---|---|---|
h/linguist/.cs/1 | .cs | predicates | [{"kind": "any", "regexes": ["^\\s*(using\\s+[A-Z][\\s\\w.]+;|namespace\\s*[\\w\\.]+\\s*(\\{|;)|\\/\\/)"]}] |