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); }
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 { }); }
internal IAsyncResult DelegateCall() { IAsyncResult procRresult = DelDisp.BeginInvoke("デリゲート実行中", new AsyncCallback(CallMethod), DelDisp); return(procRresult); }