1cfd3bbb56
Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고, Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화.
3.5 KiB
3.5 KiB
id, title, category, status, verification_status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, created_at, updated_at, review_reason, merge_history, tags, raw_sources, applied_in, github_commit
| id | title | category | status | verification_status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | created_at | updated_at | review_reason | merge_history | tags | raw_sources | applied_in | github_commit | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| csharp-operators-assignment | C# Assignment Operators | Programming_Language | draft | conceptual |
|
B | 0.83 | 2026-07-04 | 2026-07-04 |
|
|
CSharp Assignment Operators
🎯 한 줄 통찰 (One-line insight)
All 11 compound assignment operators listed here — including the bitwise ones (&= |= ^= >>= <<=) — are identical in symbol and "same as" expansion to C/C++'s set, confirming that C#'s bitwise operator support (and its assignment-operator shorthand) was inherited wholesale rather than redesigned, despite C# otherwise being a managed, higher-level language than C/C++. [S1]
🧠 핵심 개념 (Core concepts)
=— basic assignment. [S1]+= -= *= /= %=— arithmetic compound assignment; eachx op= yexpands tox = x op y. [S1]&= |= ^=— bitwise AND/OR/XOR compound assignment. [S1]>>= <<=— bitwise right-shift/left-shift compound assignment. [S1]- Every compound operator is pure shorthand — no operator introduces new semantics beyond "apply the operation, then reassign." [S1]
📖 세부 내용 (Details)
- Basic assignment:
int x = 10;. [S1] - Addition assignment:
int x = 10; x += 5;→xbecomes 15. [S1] - Full expansion table:
x = 5→x = 5;x += 3→x = x + 3;x -= 3→x = x - 3;x *= 3→x = x * 3;x /= 3→x = x / 3;x %= 3→x = x % 3;x &= 3→x = x & 3;x |= 3→x = x | 3;x ^= 3→x = x ^ 3;x >>= 3→x = x >> 3;x <<= 3→x = x << 3. [S1]
⚖️ 모순 및 업데이트 (Contradictions & updates)
- 비트 연산 대입 연산자까지 C/C++와 동일:
&= |= ^= >>= <<=를 포함한 11개 대입 연산자 전체가 C/C++의 집합과 기호·확장 규칙이 동일하다는 점이 확인됨 — C#이 매니지드 런타임 위에서 동작하는 상위 언어임에도 비트 연산 지원을 그대로 계승했음을 보여줌. [S1]
🛠️ 적용 사례 (Applied in summary)
현재 발견된 실제 적용 사례가 없습니다 — x += 5; 하나의 덧셈 대입 예제가 원문에서 제시됨. [S1]
💻 코드 패턴 (Code patterns)
Compound assignment shorthand — identical to C/C++ (C#):
int x = 10;
x += 5; // same as x = x + 5; -> x is now 15
✅ 검증 상태 및 신뢰도
- 상태: draft
- 검증 단계: conceptual
- 출처 신뢰도: B (W3Schools — widely used educational reference, not a primary standards body)
- 신뢰 점수: 0.83
- 중복 검사 결과: 신규 생성 (New discovery)
🔗 지식 그래프 (Knowledge Graph)
- 상위/루트: C# Tutorial
- 관련 개념: CSharp Operators, CSharp Operators Comparison, CPP Operators Assignment
- 참조 맥락: Operators 섹션 — Comparison Operators 챕터로 이어짐.
📚 출처 (Sources)
- [S1] W3Schools — C# Assignment Operators — https://www.w3schools.com/cs/cs_operators_assignment.php
📝 변경 이력 (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "C# Assignment Operators" page (Astra wiki-curation, P-Reinforce v3.1 format).