方法 : マネージ コードのスレッド名を設定する

更新 : 2007 年 11 月

このトピックの内容は、次の製品に該当します。

Edition

Visual Basic

C#

C++

Web Developer

Express

トピック該当なし トピック該当なし トピック該当なし トピック該当なし

Standard

トピック該当 トピック該当

トピック該当

トピック該当

Pro/Team

トピック該当

トピック該当

トピック該当

トピック該当

表の凡例 :

トピック該当

対象

トピック該当なし

該当なし

トピックは該当しますが、コマンドは既定では非表示です

既定で非表示のコマンド

マネージ コードのスレッド名を設定するには、[System.Threading.Thread.Name] プロパティを使用します。

使用例

Public Class Needle
    ' This method will be called when the thread is started.
    Sub Baz()
        Console.WriteLine("Needle Baz is running on another thread")
    End Sub
End Class

Sub Main()
    Console.WriteLine("Thread Simple Sample")
    Dim oNeedle As New Needle()
   ' Create a Thread object. 
    Dim oThread As New System.Threading.Thread(AddressOf oNeedle.Baz)
    ' Set the Thread name to "MainThread".
    oThread.Name = "MainThread"
    ' Starting the thread invokes the ThreadStart delegate
    oThread.Start()
End Sub

参照

処理手順

方法 : ネイティブ コードのスレッド名を設定する

その他の技術情報

マルチスレッド アプリケーションのデバッグ