Skip to main content
Z

C# Formatter — Reindent C# Code with Allman Brace Style

Reindent only — not a full formatter

Reindent C# source with Allman braces, auto-property normalization, and expression-bodied member tidy-up. Indentation tidy, not a full Roslyn format.

Miễn phí Không cần đăng ký Chạy trên trình duyệt Tôn trọng riêng tư Updated

Cách dùng

  1. 1 Paste C# source code.
  2. 2 Pick brace style (Allman default for C#) and indent size.
  3. 3 Toggle auto-property normalization to tidy <code class="rounded bg-slate-100 px-1 text-xs dark:bg-slate-800">{get;set;}</code> blocks.
  4. 4 Copy or download the result.

Vì sao dùng công cụ này

  • Defaults match the Microsoft / Visual Studio style: Allman braces, 4-space indent.
  • Tidies common shorthand: auto-properties and expression-bodied members.
  • Pure client-side — your code never leaves the browser.
  • For full Roslyn-level format use <code class="rounded bg-slate-100 px-1 text-xs dark:bg-slate-800">dotnet format</code> locally.

Câu hỏi thường gặp

Does this match the dotnet format CLI?

Close on braces and indent — but the CLI also reorders usings, applies analyzers, and rewrites expressions. Use dotnet format for canonical output.

Will it touch LINQ chains?

LINQ statements are reindented if they break across lines but never rewritten. Method-chain layout is preserved.

Looking for a Java formatter?

Yes — see our <a href="/java-formatter" class="underline">Java Formatter</a> which uses the same engine with K&R default.

C# Formatter là gì?

A C# Formatter is a tool that reindents C# source code in the browser using Allman braces, with auto-property normalization and expression-bodied member tidy-up. It works as an indentation tidier rather than a full Roslyn-based formatter, applying consistent layout to code while keeping the source on the user's device.

Tóm tắt

C# Formatter là công cụ lập trình miễn phí của Zerethon Tools. Reindent C# source with Allman braces, auto-property normalization, and expression-bodied member tidy-up. Indentation tidy, not a full Roslyn format. Chạy hoàn toàn trong trình duyệt — không đăng ký, không tải lên.

Danh mục
Lập trình
Giá
Miễn phí
Quyền riêng tư
Chạy trên trình duyệt
Đăng ký
Không cần

Quyền riêng tư

Dữ liệu của bạn không bao giờ rời khỏi trình duyệt trừ khi được nêu rõ. C# Formatter chạy hoàn toàn phía client — không tải lên máy chủ, không ghi log, không theo dõi dữ liệu bạn nhập.

Công cụ liên quan

Build, share, and grow on Zerethon Social

Free signup. Earn points, collect achievements, and connect with creators worldwide.

Try Zerethon free