AppDomain.GetCurrentThreadId-Methode

HINWEIS: Diese Methode ist mittlerweile veraltet.

Ruft den aktuellen Threadbezeichner ab.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

'Declaration
<ObsoleteAttribute("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread.  https://go.microsoft.com/fwlink/?linkid=14202", False)> _
Public Shared Function GetCurrentThreadId As Integer
'Usage
Dim returnValue As Integer

returnValue = AppDomain.GetCurrentThreadId
[ObsoleteAttribute("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread.  https://go.microsoft.com/fwlink/?linkid=14202", false)] 
public static int GetCurrentThreadId ()
[ObsoleteAttribute(L"AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread.  https://go.microsoft.com/fwlink/?linkid=14202", false)] 
public:
static int GetCurrentThreadId ()
/** @attribute ObsoleteAttribute("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread.  https://go.microsoft.com/fwlink/?linkid=14202", false) */ 
public static int GetCurrentThreadId ()
ObsoleteAttribute("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread.  https://go.microsoft.com/fwlink/?linkid=14202", false) 
public static function GetCurrentThreadId () : int

Rückgabewert

Eine 32-Bit-Ganzzahl mit Vorzeichen, die als Bezeichner das aktuellen Threads verwendet wird.

.NET Framework-Sicherheit

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 1.0, 1.1
Veraltet (Compilerwarnung) in 2.0

Siehe auch

Referenz

AppDomain-Klasse
AppDomain-Member
System-Namespace
Int32