Windows_/Windows_C# & App
C#: 람다식(Lambda expression) 선언 예제
sosal
2014. 7. 24. 02:11
반응형
/*
* made by so_Sal
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;
namespace test_console
{
class Program
{
delegate int Calculate(int a, int b);
delegate void Dosomething();
static void Main(string[] args)
{
Calculate cal = (a, b) => a + b;
Console.WriteLine(cal(1, 3));
Dosomething Doit = () =>
{
Console.WriteLine("진짜 아무거나 해");
};
Doit();
}
}
}
// 람다식 예제