Name
ThreadStateException
Synopsis
This exception is thrown when
an invalid method is called on
a thread. For example, once a thread has started, it cannot reenter
the ThreadState.Unstarted
state. Therefore, an
attempt to call Thread.Start( )
on that thread
throws this exception.
public class ThreadStateException : SystemException { // Public Constructors public ThreadStateException( ); public ThreadStateException(stringmessage
); public ThreadStateException(stringmessage
, ExceptioninnerException
); // Protected Constructors protected ThreadStateException(System.Runtime.Serialization.SerializationInfoinfo
, System.Runtime.Serialization.StreamingContextcontext
); }
Hierarchy
System.Object
→
System.Exception(System.Runtime.Serialization.ISerializable)
→
System.SystemException
→
ThreadStateException
Get C# in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.