--- id: csharp-operators title: "C# Operators" category: "Programming_Language" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["arithmetic operators 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", "operators", "arithmetic"] raw_sources: ["https://www.w3schools.com/cs/cs_operators.php"] applied_in: [] github_commit: "" --- # [[CSharp Operators]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) The seven arithmetic operators (`+ - * / % ++ --`) and their exact symbols/semantics are unchanged across C, C++, and now C# β€” this chapter is the second (after Comments) where "how is C# different" has no answer at all, reinforcing that C#'s syntactic closeness to the C family is strongest at the expression-operator level and only diverges once whole-program structure (mandatory classes) or memory model (managed runtime) enters the picture. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **`+`** β€” addition; also usable to chain sums across variables (`sum2 = sum1 + 250;`). [S1] - **`-`** β€” subtraction. [S1] - **`*`** β€” multiplication. [S1] - **`/`** β€” division. [S1] - **`%`** β€” modulus (division remainder). [S1] - **`++`** β€” increment, increases a variable's value by 1. [S1] - **`--`** β€” decrement, decreases a variable's value by 1. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - Direct literal addition: `int x = 100 + 50;`. [S1] - Chained variable addition: `int sum1 = 100 + 50; int sum2 = sum1 + 250; int sum3 = sum2 + sum2;` β†’ 150, 400, 800. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) - **C/C++와 μ™„μ „νžˆ λ™μΌν•œ μ‚°μˆ  μ—°μ‚°μž μ§‘ν•©**: `+ - * / % ++ --` 7개 μ—°μ‚°μžμ˜ κΈ°ν˜Έμ™€ μ˜λ―Έκ°€ C/C++와 μ „ν˜€ 차이가 μ—†λ‹€λŠ” 점이 이번 μ±•ν„°μ—μ„œ 확인됨 β€” Comments 챕터에 이은 두 번째 "μ™„μ „ 동일" 사둀. [S1] ## πŸ› οΈ 적용 사둀 (Applied in summary) ν˜„μž¬ 발견된 μ‹€μ œ 적용 사둀가 μ—†μŠ΅λ‹ˆλ‹€ β€” μ—¬λŸ¬ λ³€μˆ˜λ₯Ό μ—°μ‡„μ μœΌλ‘œ 더해 λˆ„μ  합을 λ§Œλ“œλŠ” μ˜ˆμ œκ°€ μ›λ¬Έμ—μ„œ μ œμ‹œλ¨. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Chained arithmetic across variables (C#): ```csharp int sum1 = 100 + 50; // 150 int sum2 = sum1 + 250; // 400 int sum3 = sum2 + sum2; // 800 ``` ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference, not a primary standards body) - **μ‹ λ’° 점수:** 0.83 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[C# Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[CSharp Operators Assignment]], [[CPP Operators Arithmetic]], [[C Operators]] - **μ°Έμ‘° λ§₯락:** Operators μ„Ήμ…˜ β€” Assignment Operators μ±•ν„°λ‘œ 이어짐. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” C# Operators β€” https://www.w3schools.com/cs/cs_operators.php ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "C# Operators" page (Astra wiki-curation, P-Reinforce v3.1 format).