"CSharp"의 두 판 사이의 차이

wwiki
이동: 둘러보기, 검색
(람다식(Lambda Expression))
(Events)
 
(같은 사용자의 중간 판 24개는 보이지 않습니다)
1번째 줄: 1번째 줄:
== 한정자 ==
+
https://docs.microsoft.com/ko-kr/dotnet/csharp/
  
=== internal ===
+
== C# concepts ==
동일한 어셈블리의 파일 내에서만 액세스할 수 있습니다.
+
 
 +
== How-to C# articles ==
 +
 
 +
== The .NET Compiler Platform SDK(Roslyn APIs) ==
 +
 
 +
== C# programming guide ==
 +
 
 +
=== Overview ===
 +
 
 +
=== Inside a c# program ===
 +
 
 +
=== Main() and command-line arguments ===
 +
 
 +
=== Programming concepts ===
 +
 
 +
==== Overview ====
 +
 
 +
==== Asynchronous programming ====
 +
 
 +
==== Attributes ====
 +
 
 +
==== Collections ====
 +
 
 +
====[[Covariance and contravariance]](공변성과 반공변성) ====
 +
 
 +
==== [[Expression trees]] ====
 +
 
 +
==== Interators ====
 +
 
 +
==== Languae-Intergrated Query(LINQ) ====
 +
 
 +
==== Reflection ====
 +
 
 +
==== Serialization ====
 +
 
 +
=== statements, expressions, and operators ===
 +
 
 +
=== Types ===
 +
 
 +
=== Class and Structs ===
 +
 
 +
=== Interface ===
 +
 
 +
===[[Delegates]]===
 +
 
 +
=== Arrays ===
 +
 
 +
=== Strings ===
 +
 
 +
=== Indexers ===
 +
 
 +
=== Events ===
 +
 
 +
==== 개요 ====
 +
 
 +
==== [[이벤트를 구독 및 구독취소하는 방법]] ====
 +
[[.NET 지침을 따르는 이벤트를 게시하는 방법]]
 +
 
 +
===Generics===
 +
 
 +
==== [[Overview(Generic)|Overview]] ====
 +
 
 +
==== [[Generic Type Parameters]] ====
 +
 
 +
=== [[Constraints on type parameters]] ===
 +
 
 +
==== Generic Classes ====
 +
 
 +
==== Generic Interfaces ====
 +
 
 +
==== Generic Methods ====
 +
 
 +
==== Generics And Arrays ====
 +
 
 +
==== Generic Delegates ====
 +
 
 +
==== Differences Between C++ Templates and C# Generics ====
 +
 
 +
==== Generics in the Run Time ====
 +
 
 +
==== Generics and Reflection ====
 +
 
 +
==== Generics and Attributes ====
 +
 
 +
=== Namespaces ===
 +
 
 +
=== Unsafe Code and Pointers ===
 +
 
 +
=== XML documentation comments ===
 +
 
 +
=== Exceptions and Exception Handling ===
 +
 
 +
=== File System and the Registry ===
 +
 
 +
=== Interoperability ===
 +
 
 +
== Language reference ==
 +
 
 +
===[[Overview(Language reference)|Overview]]===
 +
 
 +
=== Configure language version ===
 +
 
 +
=== Types ===
 +
 
 +
==== Value types(값 형식) ====
 +
 
 +
==== Reference types ====
 +
 
 +
==== void ====
 +
 
 +
==== var ====
 +
 
 +
==== Built-in types ====
 +
 
 +
==== Unmanaged types ====
 +
 
 +
==== Default value ====
 +
 
 +
=== Keywords ===
 +
 
 +
==== Overview ====
 +
 
 +
==== Modifiers ====
 +
 
 +
==== Statement Keywords ====
 +
 
 +
==== Method Parameters ====
 +
 
 +
==== Namespace Keywords ====
 +
 
 +
==== Type-testing Keywords ====
 +
 
 +
==== Generic Type Constraint Keywords ====
 +
 
 +
==== Access Keywords ====
 +
 
 +
==== Literal Keywords ====
 +
 
 +
==== Contextual Keywords ====
 +
 
 +
==== Query Keywords ====
 +
 
 +
=== Operators and expressions ===
 +
 
 +
==== Overview ====
 +
 
 +
==== Arithmetic operators ====
 +
 
 +
==== Boolean logical operators ====
 +
 
 +
==== Bitwise and shift operators ====
 +
 
 +
==== Equality operators ====
 +
 
 +
==== Comparison operators ====
 +
 
 +
==== Member access operator and expressions ====
 +
 
 +
====[[Type-testing operators and cast expressions]]====
 +
 
 +
==== User-defined conversion operators ====
 +
 
 +
==== Pointer-related operators ====
 +
 
 +
==== Assignment operators ====
 +
 
 +
====[[Lambda expressions]]====
 +
 
 +
==== + and += operators ====
 +
 
 +
==== - and -= operators ====
 +
 
 +
==== ?: operators ====
 +
 
 +
==== !(null-forgiving) operator ====
 +
 
 +
==== ?? and ??= operators ====
 +
 
 +
==== => operators ====
 +
 
 +
==== :: operator ====
 +
 
 +
==== await operator ====
 +
 
 +
==== default value expressions ====
 +
 
 +
==== delegate operator ====
 +
 
 +
==== nameof expression ====
 +
 
 +
==== new operator ====
 +
 
 +
==== sizeof operator ====
 +
 
 +
==== stackalloc expression ====
 +
 
 +
==== switch expression ====
 +
 
 +
==== true and false operators ====
 +
 
 +
==== with expression ====
 +
 
 +
==== Operator overloading ====
 +
 
 +
=== Special characters ===
 +
 
 +
=== Attributes read by the compiler ===
 +
 
 +
=== Preprocessor directives ===
 +
 
 +
=== Compiler options ===
 +
 
 +
=== Compiler errors ===
 +
 
 +
=== C# 6.0 draft specification ===
 +
 
 +
=== C# 7.0-9.0 proposals ===
 +
 
 +
 
 +
 
 +
<br />
 +
===== 단순 형식 =====
 +
 
 +
===== 열거형 형식 =====
  
== 콜렉션 ==
+
===== 구조체 형식 =====
가변크기 컨테이너, Vector, ArrayList, LinkedList, HashSet, Stack, HashMap<key, value>
 
  
=== IEnumerable ===
+
===== Nullable 값 형식 =====
foreach, 임의접근이 가능, 내부적으로 Enumerator를 가지고 있다.
+
null을 허용하지 않는 형식을 T라고 한다면, 이에 대응되는 nullalbe형식 T?가 있다. string?은 string 또는 null값을 보유할 수 있는 형식이다.
  
=== IEnumerator ===
+
===== 튜블 값 형식 =====
순차접근 가능(MoveNext()), 접근위치를 내부적으로 가지고 있다.
 
  
== Lambda Expression(람다 표현식) ==
+
==== 참조 형식 ====
LISP에 들어 있다. λxyㆍplus(x, y) 처럼 함수를 사용하는 변수를 명시하는 표기방법이다. λ(람다)는 그리스 문자로 물리에서는 소립자의 하나이고, 부피의 단위로 100만분의 1을 나타내기도 한다.
 
  
c#에서 람다표현식을 사용해서 익명함수를 만든다.
+
===== 클래스 형식 =====
  
=> : 람다 선언 연산자이다.
+
====== string(UTF-16) ======
(input-parameter, ...) => expression
 
  
(input-parameters) => { <sequence-of-statements> }
+
===== 인터페이스 형식 =====
<syntaxhighlight lang="c#">
 
class Program
 
{
 
    delegate int Calc(int a, int b);
 
 
 
    public static void Main(string [] args)
 
    {
 
        Calc c = (a, b) => a +b;
 
        int sum = c(1,1);
 
    }
 
}
 
  
 +
===== 배열 형식 =====
  
</syntaxhighlight>
+
===== 대리자 형식(delegate) =====
 +
<br />
  
=== Action 대리자 ===
+
=== 한정자 ===
람다 식에서 값을 반환하지 않는 경우 Action 대리자 형식 중 하나로 변환할 수 있다.<syntaxhighlight lang="c#">
 
Action hello = () => Console.WriteLine("Hello");
 
  
hell();
+
==== internal ====
</syntaxhighlight>매개변수가 2개이고 값을 반환하지 않는 람다식은 Action<T1, T2>대리자로 변환할 수 있다.<syntaxhighlight lang="c#">
+
동일한 어셈블리의 파일 내에서만 액세스할 수 있습니다.
Action<int, int> showSum = (x, y) =>
 
{
 
    int sum = x + y;
 
    Console.Write(sum);
 
}
 
showSum(1, 2);
 
</syntaxhighlight>
 
  
=== Func 대리자 ===
+
=== 콜렉션 ===
값을 반환하는 경우 Func대리자 형식으로 변환할 수 있다.
+
가변크기 컨테이너, Vector, ArrayList, LinkedList, HashSet, Stack, HashMap<key, value>
  
매개변수가 하나이고 값을 반환하는 람다식은 Func<T, TResult> 대리자로 변환할 수 있다. <syntaxhighlight lang="c#">
+
==== IEnumerable ====
Func<int> func = () => 10; // 10을 반환
+
foreach, 임의접근이 가능, 내부적으로 Enumerator를 가지고 있다.
int ten = func();
 
  
Func<int, int> square = (x) => x*x;
+
==== IEnumerator ====
Cosole.Write(square(10)); // 100출력
+
순차접근 가능(MoveNext()), 접근위치를 내부적으로 가지고 있다.
</syntaxhighlight>
 
  
== LINQ(Language Integrated Query) ==
+
=== LINQ(Language Integrated Query) ===
 
var value = from 익명변수명 in ~
 
var value = from 익명변수명 in ~
  
69번째 줄: 268번째 줄:
 
select 추출할_항목;
 
select 추출할_항목;
  
== 라이브러리 ==
+
=== 라이브러리 ===
  
===[[CommandLineParser]]===
+
====[[CommandLineParser]]====
 +
[[분류:.net]]

2023년 4월 7일 (금) 00:42 기준 최신판

https://docs.microsoft.com/ko-kr/dotnet/csharp/

목차

C# concepts[편집 | 원본 편집]

How-to C# articles[편집 | 원본 편집]

The .NET Compiler Platform SDK(Roslyn APIs)[편집 | 원본 편집]

C# programming guide[편집 | 원본 편집]

Overview[편집 | 원본 편집]

Inside a c# program[편집 | 원본 편집]

Main() and command-line arguments[편집 | 원본 편집]

Programming concepts[편집 | 원본 편집]

Overview[편집 | 원본 편집]

Asynchronous programming[편집 | 원본 편집]

Attributes[편집 | 원본 편집]

Collections[편집 | 원본 편집]

Covariance and contravariance(공변성과 반공변성)[편집 | 원본 편집]

Expression trees[편집 | 원본 편집]

Interators[편집 | 원본 편집]

Languae-Intergrated Query(LINQ)[편집 | 원본 편집]

Reflection[편집 | 원본 편집]

Serialization[편집 | 원본 편집]

statements, expressions, and operators[편집 | 원본 편집]

Types[편집 | 원본 편집]

Class and Structs[편집 | 원본 편집]

Interface[편집 | 원본 편집]

Delegates[편집 | 원본 편집]

Arrays[편집 | 원본 편집]

Strings[편집 | 원본 편집]

Indexers[편집 | 원본 편집]

Events[편집 | 원본 편집]

개요[편집 | 원본 편집]

이벤트를 구독 및 구독취소하는 방법[편집 | 원본 편집]

.NET 지침을 따르는 이벤트를 게시하는 방법

Generics[편집 | 원본 편집]

Overview[편집 | 원본 편집]

Generic Type Parameters[편집 | 원본 편집]

Constraints on type parameters[편집 | 원본 편집]

Generic Classes[편집 | 원본 편집]

Generic Interfaces[편집 | 원본 편집]

Generic Methods[편집 | 원본 편집]

Generics And Arrays[편집 | 원본 편집]

Generic Delegates[편집 | 원본 편집]

Differences Between C++ Templates and C# Generics[편집 | 원본 편집]

Generics in the Run Time[편집 | 원본 편집]

Generics and Reflection[편집 | 원본 편집]

Generics and Attributes[편집 | 원본 편집]

Namespaces[편집 | 원본 편집]

Unsafe Code and Pointers[편집 | 원본 편집]

XML documentation comments[편집 | 원본 편집]

Exceptions and Exception Handling[편집 | 원본 편집]

File System and the Registry[편집 | 원본 편집]

Interoperability[편집 | 원본 편집]

Language reference[편집 | 원본 편집]

Overview[편집 | 원본 편집]

Configure language version[편집 | 원본 편집]

Types[편집 | 원본 편집]

Value types(값 형식)[편집 | 원본 편집]

Reference types[편집 | 원본 편집]

void[편집 | 원본 편집]

var[편집 | 원본 편집]

Built-in types[편집 | 원본 편집]

Unmanaged types[편집 | 원본 편집]

Default value[편집 | 원본 편집]

Keywords[편집 | 원본 편집]

Overview[편집 | 원본 편집]

Modifiers[편집 | 원본 편집]

Statement Keywords[편집 | 원본 편집]

Method Parameters[편집 | 원본 편집]

Namespace Keywords[편집 | 원본 편집]

Type-testing Keywords[편집 | 원본 편집]

Generic Type Constraint Keywords[편집 | 원본 편집]

Access Keywords[편집 | 원본 편집]

Literal Keywords[편집 | 원본 편집]

Contextual Keywords[편집 | 원본 편집]

Query Keywords[편집 | 원본 편집]

Operators and expressions[편집 | 원본 편집]

Overview[편집 | 원본 편집]

Arithmetic operators[편집 | 원본 편집]

Boolean logical operators[편집 | 원본 편집]

Bitwise and shift operators[편집 | 원본 편집]

Equality operators[편집 | 원본 편집]

Comparison operators[편집 | 원본 편집]

Member access operator and expressions[편집 | 원본 편집]

Type-testing operators and cast expressions[편집 | 원본 편집]

User-defined conversion operators[편집 | 원본 편집]

Pointer-related operators[편집 | 원본 편집]

Assignment operators[편집 | 원본 편집]

Lambda expressions[편집 | 원본 편집]

+ and += operators[편집 | 원본 편집]

- and -= operators[편집 | 원본 편집]

?: operators[편집 | 원본 편집]

!(null-forgiving) operator[편집 | 원본 편집]

?? and ??= operators[편집 | 원본 편집]

=> operators[편집 | 원본 편집]

:: operator[편집 | 원본 편집]

await operator[편집 | 원본 편집]

default value expressions[편집 | 원본 편집]

delegate operator[편집 | 원본 편집]

nameof expression[편집 | 원본 편집]

new operator[편집 | 원본 편집]

sizeof operator[편집 | 원본 편집]

stackalloc expression[편집 | 원본 편집]

switch expression[편집 | 원본 편집]

true and false operators[편집 | 원본 편집]

with expression[편집 | 원본 편집]

Operator overloading[편집 | 원본 편집]

Special characters[편집 | 원본 편집]

Attributes read by the compiler[편집 | 원본 편집]

Preprocessor directives[편집 | 원본 편집]

Compiler options[편집 | 원본 편집]

Compiler errors[편집 | 원본 편집]

C# 6.0 draft specification[편집 | 원본 편집]

C# 7.0-9.0 proposals[편집 | 원본 편집]


단순 형식[편집 | 원본 편집]
열거형 형식[편집 | 원본 편집]
구조체 형식[편집 | 원본 편집]
Nullable 값 형식[편집 | 원본 편집]

null을 허용하지 않는 형식을 T라고 한다면, 이에 대응되는 nullalbe형식 T?가 있다. string?은 string 또는 null값을 보유할 수 있는 형식이다.

튜블 값 형식[편집 | 원본 편집]

참조 형식[편집 | 원본 편집]

클래스 형식[편집 | 원본 편집]
string(UTF-16)[편집 | 원본 편집]
인터페이스 형식[편집 | 원본 편집]
배열 형식[편집 | 원본 편집]
대리자 형식(delegate)[편집 | 원본 편집]


한정자[편집 | 원본 편집]

internal[편집 | 원본 편집]

동일한 어셈블리의 파일 내에서만 액세스할 수 있습니다.

콜렉션[편집 | 원본 편집]

가변크기 컨테이너, Vector, ArrayList, LinkedList, HashSet, Stack, HashMap<key, value>

IEnumerable[편집 | 원본 편집]

foreach, 임의접근이 가능, 내부적으로 Enumerator를 가지고 있다.

IEnumerator[편집 | 원본 편집]

순차접근 가능(MoveNext()), 접근위치를 내부적으로 가지고 있다.

LINQ(Language Integrated Query)[편집 | 원본 편집]

var value = from 익명변수명 in ~

where ...

select 추출할_항목;

라이브러리[편집 | 원본 편집]

CommandLineParser[편집 | 원본 편집]