namespace Console_interface1
{
class Program
{
delegate int delegate_pro(int p1,int p2);
private static int funcA(int para1, int para2)
{
return para1 * para2;
}
private static int funcB(int para1, string para2)
{
return para1*2;
}
private int funcC(int a)
{
int c = funcA(funcD(2), 22);
return a * c;
}
private int funcD(int a)
{
return a * 2;
}
static void Main(string[] args)
{
delegate_pro dp1 = new delegate_pro(funcA); //delegate_pro dp2 = new delegate_pro(funcB);
int a = dp1(2, 2);
Console.WriteLine("--------委托測試--------");