示例#1
0
        private void DoWorkDelegate()
        {
            this.Output = this.Output + "\r\n" + GetThreadID() + "Delegate started";

            Del          d      = new Del(BackGroundTask2);
            IAsyncResult result = d.BeginInvoke(this, new AsyncCallback(AsyncDelegateCallback), null);
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            ResultBox.Items.Clear();
            Del d = Program.CalcPrimes;
            int first, last;

            int.TryParse(firstNumber.Text, out first);
            int.TryParse(lastNumber.Text, out last);
            d.BeginInvoke(first, last, SetResult, d);
        }
    static void Main(string[] args)
    {
        Del del = new Del(Notify);

        del.BeginInvoke("abc", callback, new object { });
    }
示例#4
0
        internal IAsyncResult DelegateCall()
        {
            IAsyncResult procRresult = DelDisp.BeginInvoke("デリゲート実行中", new AsyncCallback(CallMethod), DelDisp);

            return(procRresult);
        }