최상위 10_Wiki/Topic_*였던 4개 카테고리 폴더를 10_Wiki/Topics/Topic_* 로 재배치.
콘텐츠 변경 없음(순수 폴더 이동) — Topics/ 하위 나머지 폴더는 이미 지난 커밋에서
전부 정리된 상태(잔존 항목은 에이전트 운영 상태 및 사용자가 보존을 요청한
업데이트0615/무제 3.canvas 뿐).
This chapter previews the if...else statement (voting-age example) BEFORE the Conditions section formally covers it, which is a deliberate pedagogical sequencing choice — showing WHY boolean expressions matter (they're the direct input to if) before teaching the if syntax itself — and the example itself reuses Console.WriteLine(myAge >= votingAge); printing a raw True/False before wrapping the identical comparison inside an if {} else {} block, making the connection between "a boolean expression" and "a branching decision" explicit and concrete rather than assumed. [S1]
🧠 핵심 개념 (Core concepts)
bool — a type that can only hold true or false, used for binary-state situations (yes/no, on/off). [S1]
Boolean expression — an expression (typically built with comparison operators) that itself evaluates to True/False, e.g. x > y, x == 10. [S1]
Direct literal comparison — comparisons work on literals too, not just variables: Console.WriteLine(10 > 9); is valid on its own. [S1]
Boolean expressions are the foundation of if/else — the tutorial explicitly states "the boolean value of an expression is the basis for all C# comparisons and conditions." [S1]
📖 세부 내용 (Details)
Direct declaration: bool isCSharpFun = true; bool isFishTasty = false; — printed as True/False. [S1]
Comparison-derived booleans: int x = 10; int y = 9; Console.WriteLine(x > y); // True; Console.WriteLine(x == 10); // True; Console.WriteLine(10 == 15); // False. [S1]
Real-life voting-age example, first as a bare boolean print: int myAge = 25; int votingAge = 18; Console.WriteLine(myAge >= votingAge); → True. [S1]
The SAME comparison then wrapped in a full if/else:
if (myAge >= votingAge) { Console.WriteLine("Old enough to vote!"); }
else { Console.WriteLine("Not old enough to vote."); }
[S1]
⚖️ 모순 및 업데이트 (Contradictions & updates)
if/else 문법이 정식 챕터 전에 미리 사용됨: Conditions 섹션에서 if...else를 formal하게 다루기 전에, 이 챕터가 투표 연령 예제를 통해 if/else 구문을 먼저 보여준다는 점이 확인됨 — "왜 boolean 표현식이 중요한가(if의 입력이기 때문)"를 문법을 가르치기 전에 개념적으로 먼저 연결하려는 의도적 구성. [S1]
🛠️ 적용 사례 (Applied in summary)
투표 가능 연령(18세)과 실제 나이(25세)를 비교해 먼저 bool 값을 출력하고, 그다음 동일 비교를 if...else로 감싸 "Old enough to vote!" 또는 "Not old enough to vote."를 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1]
💻 코드 패턴 (Code patterns)
Boolean expression as a bare print, then wrapped in if/else (C#):
intmyAge=25;intvotingAge=18;Console.WriteLine(myAge>=votingAge);// bare boolean -> Trueif(myAge>=votingAge){Console.WriteLine("Old enough to vote!");}else{Console.WriteLine("Not old enough to vote.");}
✅ 검증 상태 및 신뢰도
상태: draft
검증 단계: conceptual
출처 신뢰도: B (W3Schools — widely used educational reference, not a primary standards body)