I am implementing an interface that requires the implementation of BeginDoSomething and EndDoSomething . However, my DoSomething not very long. For simplicity, suppose that DoSomething compares only two variables and whether a> b returns
So my BeginDoSomething should look like this:
protected override IAsyncResult BeginDoSomething(int a, int b, AsyncCallback callback, object state) { bool returnValue = a > b; return ...;
I do not know what I have to return. I implement BeginDoSomething only because I have to, but not because my method is lengthy. Do I need to implement my own IAsyncResult ? Is there an implementation already in .NET libraries?
Louis rhys
source share