System.Threading.Thread Represents the method that executes on a . An object that contains data for the thread procedure. 1 Creates and controls a thread, sets its priority, and gets its status. To browse the .NET Framework source code for this type, see the Reference Source. 1 Initializes a new instance of the class, specifying a delegate that allows an object to be passed to the thread when the thread is started. A delegate that represents the methods to be invoked when this thread begins executing. is null. Initializes a new instance of the class. A delegate that represents the methods to be invoked when this thread begins executing. The parameter is null. Gets the currently running thread. A that is the representation of the currently running thread. 1 Gets a value indicating the execution status of the current thread. true if this thread has been started and has not terminated normally or aborted; otherwise, false. 1 Gets or sets a value indicating whether or not a thread is a background thread. true if this thread is or is to become a background thread; otherwise, false. The thread is dead. 1 Blocks the calling thread until a thread terminates, while continuing to perform standard COM and SendMessage pumping. The caller attempted to join a thread that is in the state. The thread is interrupted while waiting. 1 Blocks the calling thread until a thread terminates or the specified time elapses, while continuing to perform standard COM and SendMessage pumping. true if the thread has terminated; false if the thread has not terminated after the amount of time specified by the parameter has elapsed. The number of milliseconds to wait for the thread to terminate. The value of is negative and is not equal to in milliseconds. The thread has not been started. 1 Gets a unique identifier for the current managed thread. An integer that represents a unique identifier for this managed thread. 1 Gets or sets the name of the thread. A string containing the name of the thread, or null if no name was set. A set operation was requested, but the Name property has already been set. 1 Suspends the current thread for the specified number of milliseconds. The number of milliseconds for which the thread is suspended. If the value of the argument is zero, the thread relinquishes the remainder of its time slice to any thread of equal priority that is ready to run. If there are no other threads of equal priority that are ready to run, execution of the current thread is not suspended. The time-out value is negative and is not equal to . 1 Suspends the current thread for the specified amount of time. The amount of time for which the thread is suspended. If the value of the argument is , the thread relinquishes the remainder of its time slice to any thread of equal priority that is ready to run. If there are no other threads of equal priority that are ready to run, execution of the current thread is not suspended. The value of is negative and is not equal to in milliseconds, or is greater than milliseconds. 1 Causes the operating system to change the state of the current instance to . The thread has already been started. There is not enough memory available to start this thread. 1 Causes the operating system to change the state of the current instance to , and optionally supplies an object containing data to be used by the method the thread executes. An object that contains data to be used by the method the thread executes. The thread has already been started. There is not enough memory available to start this thread. This thread was created using a delegate instead of a delegate. 1 Gets a value containing the states of the current thread. One of the values indicating the state of the current thread. The initial value is Unstarted. 2 Represents the method that executes on a . 1 The exception that is thrown when a failure occurs in a managed thread after the underlying operating system thread has been started, but before the thread is ready to execute user code. Specifies the execution states of a . 1 The thread state includes and the thread is now dead, but its state has not yet changed to . The method has been invoked on the thread, but the thread has not yet received the pending that will attempt to terminate it. The thread is being executed as a background thread, as opposed to a foreground thread. This state is controlled by setting the property. The thread has been started, it is not blocked, and there is no pending . The thread has stopped. The thread is being requested to stop. This is for internal use only. The thread has been suspended. The thread is being requested to suspend. The method has not been invoked on the thread. The thread is blocked. This could be the result of calling or , of requesting a lock — for example, by calling or — or of waiting on a thread synchronization object such as . The exception that is thrown when a is in an invalid for the method call. 2 Initializes a new instance of the class with default properties. Initializes a new instance of the class with a specified error message. The error message that explains the reason for the exception. Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. The error message that explains the reason for the exception. The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception.