using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HelloWorld
{
class App
{
//생성자
public App()
{
Func<int,int,int> add = this.Sum;
int result = add(10, 11);
Console.WriteLine(result);
}
int Sum(int a, int b)
{
return a + b;
}
}
}
'C# > 수업 내용' 카테고리의 다른 글
람다식 연습 7 (Func) - 피자 (0) | 2021.12.24 |
---|---|
람다식 연습 6 (Func) 난수생성 (0) | 2021.12.24 |
람다식 연습 4 (Func) 장검 (0) | 2021.12.24 |
람다식 연습 3 (Action) - 빵만들기 (0) | 2021.12.24 |
람다식 연습2 (Action) (0) | 2021.12.24 |