using System;
using System.Collections.Generic;
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# > 복습 공부' 카테고리의 다른 글
배열 swap 그리기 연습2 (0) | 2021.09.14 |
---|---|
세미평가 아이템 넣기 다시 시도(실패) (0) | 2021.09.14 |
람다식 연습 4번 (Func) (0) | 2021.09.07 |
람다식 연습 3번 (Action) (0) | 2021.09.07 |
람다식 연습 2번(Action) (0) | 2021.09.07 |