C#

C# Code Screenshot Generator

Turn C# snippets into images worth sharing, without leaving your Mac.

C# reads well as an image because its keywords are dense and evenly spread, which gives most themes something to work with.

Codeshot detects C# from the code you paste, so there is no language picker to get wrong. Here is the same snippet in three of the 30 themes it ships with, rendered with the app's own stylesheets.

public record Snapshot(string Code, string Theme = "xcode")
{
    public int Scale { get; init; } = 2;

    public async Task<string> ExportAsync(string path)
    {
        var image = await Renderer.RenderAsync(Code, Theme);
        return await image.SaveAsync(path, Scale);
    }
}
Atom One · dark
public record Snapshot(string Code, string Theme = "xcode")
{
    public int Scale { get; init; } = 2;

    public async Task<string> ExportAsync(string path)
    {
        var image = await Renderer.RenderAsync(Code, Theme);
        return await image.SaveAsync(path, Scale);
    }
}
GitHub · dark
public record Snapshot(string Code, string Theme = "xcode")
{
    public int Scale { get; init; } = 2;

    public async Task<string> ExportAsync(string path)
    {
        var image = await Renderer.RenderAsync(Code, Theme);
        return await image.SaveAsync(path, Scale);
    }
}
Tokyo Night · dark

Choosing a theme for C#

Modern C# with expression-bodied members and records packs a lot into few lines, so you can usually afford a larger font than you would for other languages.

Getting the size right

Let the image follow your content, or lock it to a ratio — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3, or 3:4 — then export at 1×, 2×, or 3× so it stays sharp on a retina display. Copy it straight to the clipboard with C, or save with S.

See all 30 themes side by side, or read the full workflow.

Built for C#, and 59 other languages

Everything runs on your Mac. Your code never leaves it.

Download for macOS