---
id: csharp-method-parameters-named-args
title: "C# Named Arguments"
category: "Programming_Language"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["key: value arguments 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", "methods", "named-arguments"]
raw_sources: ["https://www.w3schools.com/cs/cs_method_parameters_named_args.php"]
applied_in: []
github_commit: ""
---

# [[CSharp Named Arguments]]

## 🎯 한 줄 통찰 (One-line insight)
Named arguments (`MyMethod(child3: "John", child1: "Liam", child2: "Liam")`) break the SECOND half of Method Parameters' positional-matching rule entirely — order no longer matters as long as each argument is labeled with its parameter name via `key: value` syntax — and this is a genuinely NEW capability with no equivalent shown in this wiki's C or C++ chapters (C++ has no built-in named-argument syntax; arguments there are strictly positional, defaults aside), making this the clearest example so far of C# extending beyond, not just matching, the C-family function-call model. [S1]

## 🧠 핵심 개념 (Core concepts)
- **Named argument syntax** — `parameterName: value`, passed in the method call regardless of the parameter's declared position. [S1]
- **Order independence** — since each argument is explicitly labeled, the CALLER's argument order no longer needs to match the method's DEFINITION order. [S1]
- **No equivalent in C/C++** — this wiki's C and C++ chapters never introduced a comparable mechanism; all their parameter-passing was strictly positional (with default values as the only relaxation). [S1]

## 📖 세부 내용 (Details)
- Example: `static void MyMethod(string child1, string child2, string child3) { Console.WriteLine("The youngest child is: " + child3); } ... MyMethod(child3: "John", child1: "Liam", child2: "Liam");` → despite `child3` being named FIRST in the call (out of definition order), it correctly binds to the `child3` parameter, printing `"The youngest child is: John"`. [S1]

## ⚖️ 모순 및 업데이트 (Contradictions & updates)
- **C/C++에 존재하지 않는 완전히 새로운 기능**: Method Parameters 챕터에서 확립된 "인자는 매개변수와 같은 순서로 전달돼야 한다"는 규칙이 이름 있는 인자(named argument)를 쓰면 완전히 무력화된다는 점이 확인됨 — C/C++는 이런 key:value 인자 전달 문법 자체가 없어 항상 위치 기반으로만 인자를 전달해야 했음. [S1]

## 🛠️ 적용 사례 (Applied in summary)
세 자녀 이름을 매개변수 정의 순서와 다르게(child3 먼저) key:value 형태로 전달해도 올바르게 바인딩되는 예제가 원문에서 직접 실전 활용 사례로 제시됨. [S1]

## 💻 코드 패턴 (Code patterns)
Named arguments — call order can differ from definition order (C#):
```csharp
static void MyMethod(string child1, string child2, string child3)
{
    Console.WriteLine("The youngest child is: " + child3);
}

static void Main(string[] args)
{
    MyMethod(child3: "John", child1: "Liam", child2: "Liam");
    // Outputs "The youngest child is: John" -- order doesn't matter
}
```

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

## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[C# Tutorial]]
- **관련 개념:** [[CSharp Method Parameters Default]], [[CSharp Method Overloading]], [[CPP Function Overloading]]
- **참조 맥락:** Methods 섹션 — Method Overloading 챕터로 이어짐.

## 📚 출처 (Sources)
- [S1] W3Schools — C# Named Arguments — https://www.w3schools.com/cs/cs_method_parameters_named_args.php

## 📝 변경 이력 (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "C# Named Arguments" page (Astra wiki-curation, P-Reinforce v3.1 format).
