Public Shared ReadOnly Property CurrentThread As Thread
Dim value As Thread value = Thread.CurrentThread
public static Thread CurrentThread { get; }
public: static property Thread^ CurrentThread { Thread^ get (); }
/** @property */ public static Thread get_CurrentThread ()
public static function get CurrentThread () : Thread
No aplicable.
Este ejemplo de código forma parte de un ejemplo más extenso referente a la propiedad IsThreadPoolThread.
Shared Sub ThreadMethod() Console.WriteLine("ThreadOne, executing ThreadMethod, " & _ "is from the thread pool? {0}", _ Thread.CurrentThread.IsThreadPoolThread) End Sub
static void ThreadMethod() { Console.WriteLine("ThreadOne, executing ThreadMethod, " + "is {0}from the thread pool.", Thread.CurrentThread.IsThreadPoolThread ? "" : "not "); }
static void ThreadMethod() { Console::WriteLine( "ThreadOne, executing ThreadMethod, " "is {0}from the thread pool.", Thread::CurrentThread->IsThreadPoolThread ? (String^)"" : "not " ); }
Windows 98, Windows 2000 Service Pack 4, Windows CE, Windows Millennium, Windows Mobile para Pocket PC, Windows Mobile para Smartphone, Windows Server 2003, Windows XP Media Center, Windows XP Professional x64, Windows XP SP2, Windows XP Starter