共用方式為


MainThread.IsMainThread 屬性

定義

如果目前的線程是UI線程,則為True。

public:
 static property bool IsMainThread { bool get(); };
public static bool IsMainThread { get; }
static member IsMainThread : bool
Public Shared ReadOnly Property IsMainThread As Boolean

屬性值

如果主線程。

適用於