8
Answers

thread ID

George George

George George

16y
11.5k
1

Hello everyone,


I am migrating from C++ to C#. And I am debugging a multi-threaded program and I need to print out the thread ID. In C++, I am using GetCurrentThreadID method, but in C#, I only find Thread.CurrentThread.ManagedThreadId.

My questions are,

1.

Does Thread.CurrentThread.ManagedThreadId have the same effect and can serve my purpose?

2.

I am confused about what means "ManagedThreadId", does there is some peer called "NonManagedThreadId"?


thanks in advance,
George

Answers (8)