c# delegate 원리
![[C#] Delegate (1)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FZ0dps%2FbtqDdG31whB%2FGc4BKGejd1CVLkkfh2BJa0%2Fimg.png)
[C#] Delegate (1)
1. 핵심 정리 using System; delegate void FUNC(int arg); class Program { static void Main() { int n = 10; double d = 3.4; string s = "hello"; // ? f = foo; FUNC f = foo; } public static void foo(int arg) { Console.WriteLine($"foo : {arg}"); } } 정수형 데이터 타입을 담는 int 실수형 데이터 타입을 담는 double 문자열 데이터 타입을 담는 string 그렇다면 11번째 라인과 같이 함수를 담는 데이터 타입을 무엇일까? ① Delegate => 메소드(메소드의 호출 정보, 메소드 모양/주소)를 저장하는 타입 => ( ) ..