System.Threading.Thread.Priority Property

Gets or sets a value indicating the scheduling priority of a thread.

Syntax

public ThreadPriority Priority { get; set; }

Value

A System.Threading.ThreadPriority value.

Exceptions

TypeReason
System.Threading.ThreadStateException The thread is in the ThreadState.Stopped state.
ArgumentExceptionThe value specified for a set operation is not a valid System.Threading.ThreadPriority value.

Remarks

A thread can be assigned any one of the following priority values:

  • Highest

  • AboveNormal

  • Normal

  • BelowNormal

  • Lowest

Operating systems are not required to honor the priority of a thread.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0