All pastes #168984 Raw Edit

Untitled

public text v1 · immutable
·published 2006-09-13 14:52 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    public delegate int BinaryOp(int x, int y);

    class Program
    {
        static void Main(string[] args)
        {
            BinaryOp b = new BinaryOp(Add);
            IAsyncResult iar = b.BeginInvoke(10, 10, null, null);
            int answer = b.EndInvoke(iar);
            Console.WriteLine("{0}", answer);
        }
        static int Add(int x, int y)
        {
            return x + y;
        }
    }
}