--- id: csharp-variables-identifiers title: "C# Identifiers" category: "Programming_Language" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["variable naming rules C#", "C# μ‹λ³„μž"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.83 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["csharp", "programming-language", "w3schools", "identifiers", "naming"] raw_sources: ["https://www.w3schools.com/cs/cs_variables_identifiers.php"] applied_in: [] github_commit: "" --- # [[CSharp Identifiers]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) C#'s identifier rules (letters/digits/underscore, must start with letter/underscore, case-sensitive, no reserved words) are the same rule-set every C-family language in this series has used verbatim β€” the interesting detail isn't the rule itself but the STYLE convention layered on top: C# explicitly recommends lowercase-starting names (camelCase, e.g. `minutesPerHour`), which will matter later when C#'s method/class names are shown starting with an UPPERCASE letter (PascalCase) β€” a naming-convention split by identifier kind that C and C++ never enforced this explicitly. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **Identifier** β€” the unique name given to a variable. [S1] - **Character rules** β€” letters, digits, and underscore (`_`) allowed; must begin with a letter or underscore (never a digit). [S1] - **Case sensitivity** β€” `myVar` and `myvar` are distinct variables. [S1] - **No whitespace** β€” names cannot contain spaces. [S1] - **No reserved words** β€” C# keywords like `int` or `double` cannot be used as identifier names. [S1] - **Style convention (recommended, not enforced)** β€” start with a lowercase letter; prefer descriptive names (`minutesPerHour`) over terse ones (`m`) for readability and maintainability. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - Good vs. acceptable naming contrast: `int minutesPerHour = 60; // Good` vs `int m = 60; // OK, but not so easy to understand`. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) - **λͺ…λͺ… κ·œμΉ™ μžμ²΄λŠ” C/C++/Java와 동일**: 문자/숫자/μ–Έλ”μŠ€μ½”μ–΄, 숫자둜 μ‹œμž‘ λΆˆκ°€, λŒ€μ†Œλ¬Έμž ꡬ뢄, μ˜ˆμ•½μ–΄ μ‚¬μš© λΆˆκ°€λΌλŠ” κ·œμΉ™μ΄ 이전 μ–Έμ–΄λ“€κ³Ό 동일함이 확인됨 β€” μ°¨μ΄λŠ” κ·œμΉ™μ΄ μ•„λ‹ˆλΌ μŠ€νƒ€μΌ ꢌμž₯(lowercase μ‹œμž‘, μ„œμˆ μ  이름 μ„ ν˜Έ)에 있음. [S1] ## πŸ› οΈ 적용 사둀 (Applied in summary) ν˜„μž¬ 발견된 μ‹€μ œ 적용 사둀가 μ—†μŠ΅λ‹ˆλ‹€ β€” minutesPerHour vs m 이름 비ꡐ가 μ›λ¬Έμ—μ„œ μŠ€νƒ€μΌ 예제둜 μ œμ‹œλ¨. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Descriptive vs. terse identifier naming (C#): ```csharp // Good int minutesPerHour = 60; // OK, but not so easy to understand what m actually is int m = 60; ``` ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference, not a primary standards body) - **μ‹ λ’° 점수:** 0.83 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[C# Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[CSharp Variables]], [[CSharp Variables Constants]] - **μ°Έμ‘° λ§₯락:** Variables μ„Ήμ…˜ β€” Constants μ±•ν„°λ‘œ 이어짐. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” C# Identifiers β€” https://www.w3schools.com/cs/cs_variables_identifiers.php ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "C# Identifiers" page (Astra wiki-curation, P-Reinforce v3.1 format).