int myThreadId = myThread.GetHashCode();

Note: GetHashCode() does not return the Win32 native thread id, but it will always 
return the same number for your managed thread
instance.

Keep Smilin'
Ed Stegman

-----Original Message-----
From: Moderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED]]On Behalf Of Beaulieu, Paul
Sent: Wednesday, July 31, 2002 11:57 AM
To: [EMAIL PROTECTED]
Subject: Where is the thread id


Hi All,

I was wondering why I am not able to get the thread id from a thread I
create using System.Threading.Thread class.  There is now way to get an id
off of this object. You can get it off of the ProcessThread object under
System.Diagnostics.ProcessThread.  But there does not seem to be any
correlation between the two types of objects.  Therefore, there is no way to
tell what thread corresponds to the thread I am trying to get the id of.
Any help would be appreciated.

Thanks,

Paul Beaulieu

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to