Compiler and Common Language Runtime Support

When the compiler emits the FactorizingAsyncDelegate delegate class after parsing its definition as shown below, it generates the BeginInvoke and EndInvoke methods using the Asynchronous Method Signatures, in addition to the Invoke method as displayed in the following code:

public class FactorizingAsyncDelegate : delegate
{
   public bool Invoke(
         int factorizableNum,  
         ref int primefactor1,
         ref int primefactor2);

   // The following code was supplied by the compiler.
   public IAsyncResultBeginInvoke(
         int factorizableNum,  
         ref int primefactor1,
         ref int primefactor2,
         AsyncCallback cb,Object AsyncState
         );

   // The following code was supplied by the compiler.
   public bool EndInvoke(
         ref int primefactor1,
         ref int primefactor2,
         IAsyncResult ar);
}

See Also

Asynchronous Delegates | Asynchronous Delegates Programming Sample