Files
2nd/10_Wiki/Topics/Domain_Programming/Topic_CSharp/CSharp_Classes.md
T
Antigravity Agent c24165b8bc refactor(topics): 멀티 에이전트용 지식 재편 — _Common(공통 기본기) + Domain_* 구조
에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게
[공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류.
문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인).

- Topic_Programming → Domain_Programming (내부 구조 보존)
- Topic_Graphic → Domain_Design
- Topic_Business → Domain_Product
- Topic_General → Domain_General
- _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning),
  Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing)
- 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서)
- 빈 폴더 정리 (memory/procedures)
- 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 11:05:56 +09:00

4.2 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-classes C# Classes and Objects Programming_Language draft conceptual
new keyword objects C#
field C#
C# 클래스와 객체
B 0.84 2026-07-04 2026-07-04
csharp
programming-language
w3schools
oop
classes
https://www.w3schools.com/cs/cs_classes.php

CSharp Classes

🎯 한 줄 통찰 (One-line insight)

The chapter's own explicit aside — "it is common that the name of the C# file and the class matches... However it is not required (like in Java)" — directly repeats the exact comparison already flagged in the Syntax chapter, meaning W3Schools' C# tutorial itself considers this Java contrast important enough to state TWICE across the series; the object-creation syntax Car myObj = new Car(); is otherwise structurally identical to C++'s heap-allocation new (though C# never requires a matching delete — memory is garbage-collected, a fact not yet stated in this chapter but implied by its complete absence). [S1]

🧠 핵심 개념 (Core concepts)

  • class keyword — defines a class, e.g. class Car { string color = "red"; }. [S1]
  • Field — a variable declared directly inside a class; also called an "attribute". [S1]
  • Naming convention (again) — class names should start uppercase (good practice, not enforced); file name matching class name is common but, unlike Java, NOT required. [S1]
  • Object creationClassName objectName = new ClassName();, e.g. Car myObj = new Car();. [S1]
  • Dot syntaxmyObj.color accesses a field on an object instance. [S1]

📖 세부 내용 (Details)

  • Class with a field: class Car { string color = "red"; }. [S1]
  • Full object creation + field access example: class Car { string color = "red"; static void Main(string[] args) { Car myObj = new Car(); Console.WriteLine(myObj.color); } } → outputs "red". [S1]

⚖️ 모순 및 업데이트 (Contradictions & updates)

  • Java와의 파일명 대비가 시리즈에서 두 번째로 반복됨: Syntax 챕터에서 이미 "C#은 Java와 달리 파일명과 클래스명이 일치할 필요가 없다"고 언급했는데, 이번 Classes 챕터가 동일한 비교를 다시 명시적으로 반복한다는 점이 확인됨 — W3Schools가 이 차이를 중요하게 여겨 두 번 강조. [S1]
  • new 키워드는 C++와 문법이 같지만 delete 짝이 없음: new Car()가 C++의 힙 할당 new와 문법상 동일해 보이지만, 이 챕터(그리고 이후 챕터들)에서 delete에 대응하는 언급이 전혀 등장하지 않는다는 점이 확인됨 — C#의 가비지 컬렉션 기반 메모리 관리를 암시(다만 이 챕터가 명시적으로 설명하지는 않음). [S1]

🛠️ 적용 사례 (Applied in summary)

Car 클래스에 color 필드를 정의하고, new로 객체를 만들어 점(.) 문법으로 필드 값을 출력하는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1]

💻 코드 패턴 (Code patterns)

Class definition, object creation, and dot-syntax field access (C#):

class Car
{
    string color = "red";

    static void Main(string[] args)
    {
        Car myObj = new Car();
        Console.WriteLine(myObj.color);  // "red"
    }
}

검증 상태 및 신뢰도

  • 상태: draft
  • 검증 단계: conceptual
  • 출처 신뢰도: B (W3Schools — widely used educational reference, not a primary standards body)
  • 신뢰 점수: 0.84
  • 중복 검사 결과: 신규 생성 (New discovery)

🔗 지식 그래프 (Knowledge Graph)

📚 출처 (Sources)

📝 변경 이력 (Change history)

  • 2026-07-04: Initial draft synthesized from the W3Schools "C# Classes and Objects" page (Astra wiki-curation, P-Reinforce v3.1 format).