|
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
namespace EventBasedAsync
{
public delegate void DoSomethingCompletedEventHandler(object sender, DoSomethingCompletedEventArgs args);
public class DoSomethingCompletedEventArgs : AsyncCompletedEventArgs
{
public DoSomethingCompletedEventArgs(Exception error, bool cancelled, object userState, int? result)
: base(error, cancelled, userState)
{
this.result = result;
}
public int Result
{
get
{
RaiseExceptionIfNecessary();
return result ?? -1;
}
}
private readonly int? result;
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I got my B.Sc. in Mathematics and Computer Science from Tel Aviv University in 1997. Since then I have developed software in UNIX, Win32 and .NET. I currently live in Haifa.