/// <summary> /// Returns the current native system thread ID. /// </summary> /// <remarks> /// Even if currently each dedicated managed /// thread (not a thread from a <see cref="ThreadPool"/>) exactly maps to one native /// system thread, this behavior may change in future versions. /// If you would like to have unintercepted threads, you should make sure that they are /// dedicated ones, e.g. derived from <see cref="Thread"/>. /// </remarks> /// <returns>The native system thread ID.</returns> public static Int32 GetCurrentThreadId() { return(NativeAPI.GetCurrentThreadId()); }