docs(10_Wiki): Dev 폴더 누락분 반영 — Topic_Programming으로 통합
이전 재구성 작업에서 Dev/ 폴더가 누락되었던 것을 반영. - Dev/Topic_Programming(중첩 폴더, 78개)은 Dev 자체 최상위 폴더들 (Architecture/Conventions/Engineering_Intelligence 등)과 완전 중복이라 제거. - Dev 최상위 엔지니어링 지식 폴더(Architecture/Conventions/Engineering_Intelligence/ Failure_Library/Generalized_Principles/Language/Pattern_Catalog/Platform_Guides/ Subsystems, 77개)는 이미 Topic_Programming/Topic_Programming에 더 최신 버전이 존재해 중복 제거(고유 콘텐츠 1개는 예외 처리하여 이동 보존). - Dev의 W3Schools 언어 튜토리얼 폴더(Topic_C/CPP/CSS/CSharp/HOWTO/HTML/Java/ JavaScript/PHP/Python/SQL/W3CSS, 1201개)는 전부 Topic_Programming 하위로 이동. - 에이전트 운영 상태(.astra/docs)는 그대로 유지, 콘텐츠 폴더만 정리. - Topic_Programming 최종 문서 수: 2784 → 3985.
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
---
|
||||
id: csharp-variables
|
||||
title: "C# Variables"
|
||||
category: "Programming_Language"
|
||||
status: "draft"
|
||||
verification_status: "conceptual"
|
||||
canonical_id: ""
|
||||
aliases: ["int double char string bool", "C# 변수"]
|
||||
duplicate_of: ""
|
||||
source_trust_level: "B"
|
||||
confidence_score: 0.85
|
||||
created_at: 2026-07-04
|
||||
updated_at: 2026-07-04
|
||||
review_reason: ""
|
||||
merge_history: []
|
||||
tags: ["csharp", "programming-language", "w3schools", "variables"]
|
||||
raw_sources: ["https://www.w3schools.com/cs/cs_variables.php"]
|
||||
applied_in: []
|
||||
github_commit: ""
|
||||
---
|
||||
|
||||
# [[CSharp Variables]]
|
||||
|
||||
## 🎯 한 줄 통찰 (One-line insight)
|
||||
C#'s five introductory types (int/double/char/string/bool) match Java's primitive-plus-String lineup almost exactly, but `string` in C# is a genuine built-in keyword-level type from the very first variable chapter — no separate library import, no `<string>` header, no `std::string` namespace qualifier — collapsing what took C an entire "no native strings" caveat and C++ a dedicated Strings section (`<string>` header, `std::string` vs C-style char arrays) into a single bullet point alongside int/double/char/bool. [S1]
|
||||
|
||||
## 🧠 핵심 개념 (Core concepts)
|
||||
- **`int`** — whole numbers without decimals (e.g. `123`, `-123`). [S1]
|
||||
- **`double`** — floating-point numbers with decimals (e.g. `19.99`, `-19.99`). [S1]
|
||||
- **`char`** — a single character, surrounded by SINGLE quotes (`'a'`). [S1]
|
||||
- **`string`** — text, surrounded by DOUBLE quotes (`"Hello World"`) — a first-class type from the start, not a library add-on. [S1]
|
||||
- **`bool`** — two states only: `true` or `false`. [S1]
|
||||
- **Declaration syntax** — `type variableName = value;`; can also declare without initializing, then assign later (`int myNum; myNum = 15;`). [S1]
|
||||
- **Reassignment overwrites** — assigning a new value to an existing variable replaces the old one silently (no warning). [S1]
|
||||
|
||||
## 📖 세부 내용 (Details)
|
||||
- String declaration + print: `string name = "John"; Console.WriteLine(name);`. [S1]
|
||||
- Int declaration + print: `int myNum = 15; Console.WriteLine(myNum);`. [S1]
|
||||
- Declare-then-assign: `int myNum; myNum = 15; Console.WriteLine(myNum);`. [S1]
|
||||
- Overwrite: `int myNum = 15; myNum = 20; // myNum is now 20`. [S1]
|
||||
- All five types declared together: `int myNum = 5; double myDoubleNum = 5.99D; char myLetter = 'D'; bool myBool = true; string myText = "Hello";` — note the `D` suffix on the double literal. [S1]
|
||||
|
||||
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||||
- **string이 처음부터 내장 타입으로 취급됨**: C는 문자열이라는 내장 타입 자체가 없어 char 배열로 흉내내야 했고, C++는 `<string>` 헤더와 `std::string`을 별도로 배워야 했지만, C#은 첫 변수 챕터부터 int/double/char/bool과 동일한 급으로 string을 나열한다는 점이 확인됨 — 별도 import나 네임스페이스 한정자 없이 바로 사용 가능. [S1]
|
||||
|
||||
## 🛠️ 적용 사례 (Applied in summary)
|
||||
현재 발견된 실제 적용 사례가 없습니다 — name(string)과 myNum(int) 변수를 선언하고 출력하는 기본 예제가 원문에서 제시됨. [S1]
|
||||
|
||||
## 💻 코드 패턴 (Code patterns)
|
||||
Declaring all five basic C# types (C#):
|
||||
```csharp
|
||||
int myNum = 5;
|
||||
double myDoubleNum = 5.99D;
|
||||
char myLetter = 'D';
|
||||
bool myBool = true;
|
||||
string myText = "Hello";
|
||||
```
|
||||
|
||||
## ✅ 검증 상태 및 신뢰도
|
||||
- **상태:** draft
|
||||
- **검증 단계:** conceptual
|
||||
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||||
- **신뢰 점수:** 0.85
|
||||
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||||
|
||||
## 🔗 지식 그래프 (Knowledge Graph)
|
||||
- **상위/루트:** [[C# Tutorial]]
|
||||
- **관련 개념:** [[CSharp Variables Identifiers]], [[CSharp Data Types]], [[CPP Strings]], [[C Strings]]
|
||||
- **참조 맥락:** Variables 섹션 — Identifiers 챕터로 이어짐.
|
||||
|
||||
## 📚 출처 (Sources)
|
||||
- [S1] W3Schools — C# Variables — https://www.w3schools.com/cs/cs_variables.php
|
||||
|
||||
## 📝 변경 이력 (Change history)
|
||||
- 2026-07-04: Initial draft synthesized from the W3Schools "C# Variables" page (Astra wiki-curation, P-Reinforce v3.1 format).
|
||||
Reference in New Issue
Block a user