csharp-naming-conventions
Skill4.8k starsChanged 4 months agoMITView on GitHub
C# and .NET naming conventions, coding best practices, layout rules, unit testing, and Blazor component guidelines. Use when writing, reviewing, or refactoring C# / .NET / Blazor code or writing unit tests with xUnit and bUnit.
Trending
More talk lately.about the whole repository
Who's talking about microsoft/fluentui-blazor
- dotnet/roslyn“CS8669 - #nullable enable does not work in razor files unless in code block”GitHub · May 17, 2023 · 15 reactions
- @baaijte.net“Only 87 stars to go on github.com/microsoft/fl... to get to 4k. Will you help us reach that goal before the …”Bluesky · Dec 4, 2024 · 9 likes
- MicrosoftEdge/WebView2Feedback“[Problem/Bug]: FluentUI ComboBox/Select don't accept selected option in WinUI WebView2”GitHub · May 8, 2024 · 4 reactions
- dotnet/roslyn“Razor tools are crashing in VS 2026”GitHub · Jan 14, 2026 · 2 reactions
- @svrooij.io“FluentUI for #blazor is almost at 4000 stars on GitHub? Can you help in making it to four thousand? …”Bluesky · Dec 4, 2024 · 2 likes
The biggest 5 of 39 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 39
Talked about on GitHub and Bluesky (39 times).
On GitHub · 36
- May 17, 2023CS8669 - #nullable enable does not work in razor files unless in code block — dotnet/roslyn15 reactions · 10 comments
- May 8, 2024[Problem/Bug]: FluentUI ComboBox/Select don't accept selected option in WinUI WebView2 — MicrosoftEdge/WebView2Feedback4 reactions · 3 comments
- Jan 14, 2026Razor tools are crashing in VS 2026 — dotnet/roslyn2 reactions · 24 comments
- May 2, 2024[Feature]: Allow binding to different Cultures for NumberField — microsoft/fluentui2 reactions · 9 comments
- May 17, 2023Document Blazor CSS Isolation Workflows — ni/nimble2 reactions
31 more on GitHub
- Sep 10, 2026fix(web-components): defer fallback custom-state attributes — microsoft/fluentui1 reaction · 4 comments
- Jul 14, 2026Implement all the features defined in PRD and TRD — devkimchi/az-sub-cost-management1 reaction
- Jun 7, 2026chore(deps): Bump the microsoft-platform group with 4 updates — Nerttiyana-Technologies/Stampd1 reaction · 2 comments
- Apr 22, 2026Update dependency Microsoft.FluentUI.AspNetCore.Components to 4.14.2 - autoclosed — archanox/GUNRPG1 reaction
- Mar 11, 2026Update .editorconfig to adjust indent sizes for various file types — Eternet/github1 reaction
- Oct 23, 2025Guidance on integrating build generated files into Static Web Assets — dotnet/AspNetCore.Docs1 reaction · 5 comments
- Aug 16, 2024[Feature]: TreeView Multiselection — microsoft/fluentui1 reaction · 6 comments
- Mar 7, 2024Remove key from overflow item to fix re-rendering — microsoft/aspire1 reaction
- Mar 6, 2024Resource commands menu goes off the bottom of the screen — microsoft/aspire1 reaction · 1 comment
- Jan 10, 2024Prevent use of local functions inside markup — dotnet/aspnetcore1 reaction · 4 comments
- Nov 27, 2023Use tri-state feature in FluentCheckbox — microsoft/aspire1 reaction · 2 comments
- Nov 2, 2023[Bug]: page with a lot of FluentButtons becomes slower and slower (web-components — microsoft/fluentui1 reaction · 3 comments
- Aug 16, 2023feat: add functionality for enabling Virtualized Listbox — microsoft/fast1 reaction · 10 comments
- Oct 5, 2026Bump Microsoft.FluentUI.AspNetCore.Components.Icons from 4.14.4 to 5.0.0 — AlexHedley/poker-recording0 reactions
- Oct 2, 2026Bump Microsoft.FluentUI.AspNetCore.Components from 4.14.4 to 5.0.0 — lfm-org/lfm0 reactions
- Oct 2, 2026Bump the dotnet-minor group with 4 updates — lfm-org/lfm0 reactions
- Oct 2, 2026chore: Bump Microsoft.FluentUI.AspNetCore.Components.Icons from 4.14.4 to 5.0.0 — MW-GC/EventManager0 reactions
- Oct 2, 2026chore: Bump Microsoft.FluentUI.AspNetCore.Components from 4.14.4 to 5.0.0 — MW-GC/EventManager0 reactions
- Oct 1, 2026Bump Microsoft.FluentUI.AspNetCore.Components from 4.14.4 to 5.0.0 — azabluda/InfoCarrier.Core0 reactions
- Oct 1, 2026Bump Microsoft.FluentUI.AspNetCore.Components from 4.14.4 to 5.0.0 — arika0093/BlazorLocalTime0 reactions · 1 comment
- Oct 1, 2026nuget-dressca-cms: Bump the fluentui-packages group with 2 updates — AlesInfiny/maris0 reactions · 1 comment
- Sep 29, 2026Bump Microsoft.FluentUI.AspNetCore.Components from 4.14.4 to 5.0.0 — justinyoo/spn-imda0 reactions
- Sep 28, 2026Bump Microsoft.FluentUI.AspNetCore.Components.Emoji from 4.14.4 to 5.0.0 — AlexHedley/Utility-Blazor0 reactions
- Sep 28, 2026Bump Microsoft.FluentUI.AspNetCore.Components from 4.14.4 to 5.0.0 — AlexHedley/Utility-Blazor0 reactions
- Sep 28, 2026Bump Microsoft.FluentUI.AspNetCore.Components and Microsoft.FluentUI.AspNetCore.Components.Icons — AliceNovel/AquaNotes0 reactions
- Aug 24, 2026chore(deps): Bump the microsoft-platform group with 19 updates — Nerttiyana-Technologies/Stampd0 reactions · 1 comment
- Jul 15, 2026Bump the web group with 5 updates — CorruptComputer/BlazorWasmOsmOauth0 reactions · 1 comment
- Jun 29, 2026Bump the microsoft-fluentui group with 2 updates — twsouthwick/obsidian-livesync-manager0 reactions
- May 28, 2026Bump Microsoft.FluentUI.AspNetCore.Components and Microsoft.FluentUI.AspNetCore.Components.Icons — Ozymandros/Godot-Generator0 reactions
- Jan 18, 2026Bump the nuget-dependencies group with 4 updates — macel94/blazorazdocustomextsample0 reactions
- Dec 10, 2024IL trimming support — havit/Havit.Blazor0 reactions · 1 comment
On Bluesky · 3
- Dec 4, 2024Only 87 stars to go on github.com/microsoft/fl... to get to 4k. Will you help us reach that goal before the end of the year? — @baaijte.net9 likes and reposts · 1 reply
- Dec 4, 2024FluentUI for #blazor is almost at 4000 stars on GitHub? Can you help in making it to four thousand? github.com/microsoft/fl... Just press… — @svrooij.io2 likes and reposts
- Nov 19, 2023📦 microsoft / fluentui-blazor ⭐ 1,950 (+12) 🗒 C# Microsoft Fluent UI Blazor components library. For use with .NET 6.0 or higher Blazor… — @github-trending.bsky.social2 likes and reposts
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- Fluent UI Blazor v5 — Usage GuideSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 88
Use the linked rule files above for detailed explanations and code examples.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
C# Naming Conventions and Best Practices
Comprehensive coding guidelines for .NET and C# developments, covering naming, layout, code patterns, unit testing, and Blazor conventions. Prioritized by impact to guide automated code generation and review.
When to Apply
Reference these guidelines when:
- Writing new C# / .NET code
- Reviewing or refactoring existing C# code
- Naming classes, methods, variables, properties, or parameters
- Formatting and laying out source files
- Working with async/await patterns
- Writing if/else, string, exception, or conversion logic
- Writing or reviewing unit tests (xUnit, bUnit)
- Building Blazor components and pages
- Organizing project file structures
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
| 1 | Naming & Casing | CRITICAL | naming- |
| 2 | Code Layout & Formatting | HIGH | layout- |
| 3 | Code Patterns | HIGH | code- |
| 4 | Unit Testing | HIGH | testing- |
| 5 | Blazor Conventions | MEDIUM-HIGH | blazor- |
Quick Reference
1. Naming & Casing (CRITICAL)
- naming-casing - Pascal case and Camel case conventions for all C# identifiers
- naming-files - File organization: one class per file, namespace matches folder
- naming-items - Explicit, unabbreviated, English-only names without prefixes
- naming-async - Postfix async methods with Async, eliding guidelines
2. Code Layout & Formatting (HIGH)
- layout-formatting - Indentation, braces, line length, and formatting rules
- layout-members-order - Member ordering within classes and no #region usage
3. Code Patterns (HIGH)
- code-variables - Variable declarations, var usage, access modifiers
- code-comments - Commenting conventions and XML documentation
- code-using-namespace - Using directives and file-scoped namespaces
- code-if-pattern - If braces, no-else-return, and guard pattern
- code-strings - String interpolation and StringBuilder usage
- code-exceptions - Exception handling and avoiding generic catches
- code-operators - Allowed and denied C# operators
- code-conversion - Data type conversion rules, never use ToString()
- code-datetime - DateTimeProvider for testable date/time code
- code-static - Avoid static classes except for extension methods
4. Unit Testing (HIGH)
- testing-practices - Seven best practices for unit tests
- testing-coverage - Code coverage with Coverlet and ReportGenerator
- testing-blazor - Blazor unit tests with bUnit and Verifier
5. Blazor Conventions (MEDIUM-HIGH)
- blazor-components - Component naming, routing, and file structure
- blazor-structure - Project folder organization with SOLID principles
- blazor-code - Methods, properties order, inject, and nullable defaults
- blazor-css - CSS isolation, root class and attribute selectors
- blazor-javascript - JavaScript interop and collocated JS files
- blazor-css - CSS isolation and ::deep pseudo-element usage
- blazor-performance - Rendering, cascading parameters, and optimization
How to Use
Use the linked rule files above for detailed explanations and code examples. Each rule file contains:
- Brief explanation of why it matters
- Correct code examples
- Incorrect patterns to avoid (when applicable)
- References to external guidelines
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

