Delegate

using System;

using System.Collections.Generic;


using System.Text;



namespace param_parameter
{
    delegate int delegate1(int x, int y);
    class Program
    {
        
        static int F1(int a, int b)
        {
            return (a + b);
        }
        static int F2(int a, int b)
        {
            return (a - b);
        }
        static void Main(string[] args)
        {
            delegate1 d = new delegate1(Program.F1);
            int r = d(100, 200);
            Console.WriteLine(r.ToString());
            Console.ReadLine();

        }

    }

}

Ebook Download
View all
FileInfo in C#
Read by 9.7k people
Download Now!
Learn
View all