Mono Class Library: System.Threading.Thread Overview | Members

System.Threading.Thread.IsBackground Property

Gets or sets a bool value indicating whether a thread is a background thread.

public bool IsBackground { set; get; }

Value

true if the thread is or is to become a background thread; otherwise, false.

Exceptions

TypeReason
System.Threading.ThreadStateException The thread has reached the ThreadState.Stopped state.

Remarks

The default value of this property is false. The property value can be changed before the thread is started and before it terminates.

Note: A thread is either a background thread or a foreground thread. Background threads are identical to foreground threads except for the fact that background threads do not prevent a process from terminating. Once all foreground threads belonging to a process have terminated, the execution engine ends the process by invoking Thread.Abort(object) on any background threads that are still alive.

Requirements

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