Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New B- cannot seem to find out what thread is running

Status
Not open for further replies.

Gzk2010

Programmer
Aug 17, 2010
48
US
Hi,

when this line runs....
Code:
string whatThread = Thread.CurrentThread.ToString();
I get instead of thread3 for the value of whatThread for example, System.Threading.Thread

How to really extract the thread?
 
you are really extracting the thread. by default ToString() returns the name of the system type. some object override ToString() to return meaningful information.

once you have the current thread, you can access any of the properties of that thread.
Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top