Asynchronous Method Signatures
This page is specific to:.NET Framework Version:1.1
.NET Framework Developer's Guide
Asynchronous Method Signatures

The method signature is the ordering of the parameter types in a method. The rules for the BeginInvoke asynchronous method signature are:

  • Include all IN parameters.
  • Include all OUT parameters.
  • Include all IN/OUT parameters.
  • Include all ByRef parameters.
  • Take AsyncCallback and AsyncState (available through the AsyncState property on the IAsyncResult interface) as the last two parameters.
  • Return IAsyncResult.

The rules for the EndInvoke asynchronous method signature are:

  • Include all IN/OUT parameters.
  • Include all OUT parameters.
  • Include all ByRef parameters.
  • Take IAsyncResult as last parameter.
  • Return the original return type from the original method signature.

The result object (IAsyncResult) is returned from the begin operation, and can be used to obtain status on whether the asynchronous begin operation has completed. The result object is passed to the end operation, which returns the final return value of the call. An optional callback can be supplied in the begin operation. If the callback is supplied, when the call completes, the callback will be called; and code in the callback can call the end operation.

See Also

Asynchronous Design Pattern Overview | IAsyncResult Interface | AsyncCallback Delegate for Asynchronous Operations | Asynchronous Programming

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View