Here is a walkthrough that you can use.
http://msdn.microsoft.com/en-us/library/bz33kx67.aspx
Jeremy Shovan
"Varangian" <(E-Mail Removed)> wrote in message
news:af2009d6-615e-4a9c-8fd0-(E-Mail Removed)...
> Yes thanks. but why I can't find any example on the internet?!
>
> Peter Duniho wrote:
>> On Thu, 15 May 2008 07:58:30 -0700, Varangian <(E-Mail Removed)> wrote:
>>
>> > Basically I want to create my own long running tasks asynchronously.
>> > I want to have a BeginMyOwnLongTediousMethod
>> > and EndMyOwnLongTediousMethod
>> >
>> > You know like the framework already has the methods of
>> > BeginExecuteReader that return an IAsynchResult.
>> >
>> > Is there any way I can do my own?
>>
>> Yes, of course.
>>
>> Start here:
>> http://msdn.microsoft.com/en-us/library/ms228963.aspx
>>
>> Read that page, and follow the various links that relate to implementing
>> your own asynchronous API.
>>
>> Keep in mind that you may find that it's simpler to, rather than add an
>> asynchronous API to your own classes, just use your classes from an
>> existing asynchronous mechanism in .NET (such as using BackgroundWorker).
>>
>> Pete