System.Threading.Thread.Name Property

Gets or sets the name of the thread.

Syntax

public string Name { get; set; }

Value

A string containing the name of the thread, or null if no name was set.

Exceptions

TypeReason
InvalidOperationExceptionA set operation was requested, and the Name property has already been set.

Remarks

This property is write-once.

Requirements

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