• Monitor and lock

            <p>Below is sample code about how to use Monitor. </p>
    
  • Thread Interrupt vs Abort

            <p>Both methods can terminate a thread.  The difference is that they raise difference exception, interrupt can use goto to save its life, abort can not use goto to save its life, and abort can pass some information into the running thread by calling Abort(object stateInfo). The running thread can access this object by ThreadAbortException.ExceptionState .
            </p>
    
  • Threads and exceptions

            <p>
            If the thread method completes its execution, .NET will shutdown the thread gracefully. However, any unhandled exception thrown on the call stack of the thread will terminate not just the thread but also will trigger shutdown of hosting process itself. The one exception to this rule is the <b>ThreadAbortException</b>, which will only terminate the aborted thread. This behavior is a breaking change introduced by .NET 2.0. In contract, .NET 1.1 will only terminate the thread that encountered the unhandled exception. When porting .NET 1.1 applications to .NET 2.0, make sure that your thread methods always catch and handle any exception, otherwise you risk unplanned application termination.
            </p>
    
  • CallExternalMethod

    A workflow can use a activity of type CallExternalMethod. This method is a member of type which addressed with ExteranlDataExchange attribute. To make the method call useful, the parameter of the method should be the information that need to send to client. So the workflow should be responsible to supply the parameters.

  • Initialize a configuration section

    in the configuration file, not config section is defined, you can use the following code to initialize the configuration.