log4net SDK Reference

SystemInfo.CurrentThreadId Property

[This is preliminary documentation and subject to change.]

Gets the ID of the current thread.

[Visual Basic]
Public Shared ReadOnly Property CurrentThreadId As Integer
[C#]
public static int CurrentThreadId {get;}

Property Value

The ID of the current thread.

Remarks

On the .NET framework, the AppDomain.GetCurrentThreadId method is used to obtain the thread ID for the current thread. This is the operating system ID for the thread.

On the .NET Compact Framework 1.0 it is not possible to get the operating system thread ID for the current thread. The native method GetCurrentThreadId is implemented inline in a header file and cannot be called.

See Also

SystemInfo Class | log4net.Util Namespace