Skip to content
AIWikis.org

C# Coding Standard

Publication Warning This page is marked noindex and should not be treated as canonical public authority.

Use this as the global baseline for C# work. Project-local rules still win when they are stricter.

Metadata

FieldValue
Source siteaiwikis.org
Source URLhttps://aiwikis.org/
Canonical AIWikis URLhttps://aiwikis.org/aiwikis/files/wiki-global-coding-standards-csharp-md-452adf79/
Source referencewiki/global/coding-standards/csharp.md
File typemd
Content categoryllm-wiki
Last fetched2026-06-22T01:56:21.9510185Z
Last changed2026-05-15T23:02:00.0545413Z
Content hashsha256:452adf79d563c9a1431675bad47d6cf89323f5e31af8594ef3a510b7075688b4
Import statusunchanged
Raw source layerdata/sources/aiwikis/wiki-global-coding-standards-csharp-md-452adf79d563.md
Normalized source layerdata/normalized/aiwikis/wiki-global-coding-standards-csharp-md-452adf79d563.txt

Current File Content

Structure Preview

  • C# Coding Standard
  • Code Shape
  • Data Access
  • Tests

Raw Version

---
uai_id: "3d08a7d9-a850-4030-8b0a-4d1c305b36d8"
type: "coding-standard"
owner: "AIWikis maintainers"
status: "Reviewed"
source_system: "AIWikis.org global"
source_status: "local synthesis from multisite .NET implementation practice"
sensitivity: "public-safe source-side memory"
agent_use: "load for C# and .NET implementation work unless the target project provides a stricter local rule"
lineage:
  - "wiki/global/coding-standards/index.md"
  - "wiki/protocol5/index.md"
  - "wiki/justaniota/index.md"
source_trace:
  - "wiki/global/coding-standards/csharp.md"
confidence: 0.83
confidence_label: "reviewed-local"
last_linted: "2026-05-08T00:00:00Z"
handoff_export: "include"
aliases:
  - "C# Coding Standard"
  - "Global .NET Standard"
last_reviewed: "2026-05-15"
typed_relations:
  part_of:
    - "wiki/index.md"
  depends_on: []
  supersedes: []
  contradicts: []
  source_for: []
---
# C# Coding Standard

Use this as the global baseline for C# work. Project-local rules still win when they are stricter.

## Code Shape

- Use explicit types where a project requires them; Protocol5 and JustAnIota do not use `var`.
- Keep public contracts small, named, and stable.
- Prefer immutable request/response models unless the local serialization pattern requires setters.
- Keep SQL access behind repository or service abstractions.
- Avoid Entity Framework in Protocol5 and JustAnIota unless the human explicitly changes that architecture.
- Keep async methods cancellation-aware when they cross IO, database, process, or network boundaries.

## Data Access

- Prefer `Microsoft.Data.SqlClient` for SQL Server from .NET code.
- Use parameters for all user or data-derived values.
- Keep DDL and population contracts in shared schema generators when a desktop app and script both use them.
- Expose query text in tests when contract stability matters.

## Tests

- Add focused tests for SQL text, public API contracts, safety boundaries, and deterministic conversion rules.
- Test source scans for forbidden framework drift when a project has a hard dependency boundary.
- Keep long live-data population tests opt-in; use small smoke limits for ordinary verification.

Why This File Exists

This is a LLM Wiki memory file from aiwikis.org. It is shown here because AIWikis.org is demonstrating the real source files that make the UAIX / LLM Wiki memory system work, not only summarizing those systems after the fact.

Role

This file belongs to the source-side wiki layer. It preserves a focused concept, source proxy, graph record, or operating rule so the public site can cite reviewed conclusions without flattening every reason into a single long page.

Structure

The file is structured around these visible headings: C# Coding Standard; Code Shape; Data Access; Tests. Those headings are retrieval anchors: a crawler or LLM can decide whether the file is relevant before reading every line.

Prompt-Size And Retrieval Benefit

Keeping this material in a separate file reduces prompt pressure because an agent can load this exact unit only when its role, source site, category, or hash is relevant. The surrounding index pages point to it, while this page preserves the full content for audit and exact recall.

How To Use It

  • Humans should read the metadata first, then inspect the raw content when they need exact wording or provenance.
  • LLMs and agents should use the source site, category, hash, headings, and related files to decide whether this file belongs in the active prompt.
  • Crawlers should treat the AIWikis page as transparent evidence and follow the source URL/source reference for authority boundaries.
  • Future maintainers should regenerate this page whenever the source hash changes, then review the explanation if the role or structure changed.

Update Requirements

When this source file changes, update the raw source layer, normalized source layer, hash history, this rendered page, generated explanation, source-file inventory, changed-files report, and any source-section index that links to it.

Related Pages

Provenance And History

  • Current observation: 2026-06-22T01:56:21.9510185Z
  • Source origin: current-source-workspace
  • Retrieval method: local-source-workspace
  • Duplicate group: sfg-341 (primary)
  • Historical hash records are stored in data/hashes/source-file-history.jsonl.

Machine-Readable Metadata

{
    "title":  "C# Coding Standard",
    "source_site":  "aiwikis.org",
    "source_url":  "https://aiwikis.org/",
    "canonical_url":  "https://aiwikis.org/aiwikis/files/wiki-global-coding-standards-csharp-md-452adf79/",
    "source_reference":  "wiki/global/coding-standards/csharp.md",
    "file_type":  "md",
    "content_category":  "llm-wiki",
    "content_hash":  "sha256:452adf79d563c9a1431675bad47d6cf89323f5e31af8594ef3a510b7075688b4",
    "last_fetched":  "2026-06-22T01:56:21.9510185Z",
    "last_changed":  "2026-05-15T23:02:00.0545413Z",
    "import_status":  "unchanged",
    "duplicate_group_id":  "sfg-341",
    "duplicate_role":  "primary",
    "related_files":  [

                      ],
    "generated_explanation":  true,
    "explanation_last_generated":  "2026-06-22T01:56:21.9510185Z"
}

Next Useful Routes

  • Start Here A task-first reading path for AIWikis.org, separating newcomer learning, source-memory lookup, maintainer workflow, and AI-agent retrieval.
  • Topic Index A tag-oriented index for LLM Wiki, AI memory, UAI, source governance, crawling, and retrieval topics.
  • Source Map AIWikis source-governed page for durable AI memory, evidence routing, and agent-readable retrieval.
  • AIWikis.org AIWikis.org source-system overview for transparent AIWikis memory demonstration.
  • AIWikis.org Files Site-scoped current-source file index for AIWikis.org.
  • AIWikis.org UAI System Files Real current AIWikis file-backed content, source-side wiki, raw archive, graph, handoff, and public-route evidence files.