All pastes #620518 Raw Edit

Zeug

public text v1 · immutable
·published 2007-07-15 15:28 UTC
rendered paste body
        /// <summary>
        /// Delegate for CreateThread.
        /// </summary>
        delegate void ThreadMethod( object state );

        private static void CreateThread( ThreadMethod method, object data )
        {
            // create a callback
            WaitCallback callback = new WaitCallback( method );

            // setup thread
            ThreadPool.QueueUserWorkItem( callback, data );
        }