Is it possible to get a thread's "name" like a method (CurrentMethodName)?

I’ve now converted an app to use threads for all background tasks, but I’m running into odd NOEs in what appear to be random situations in one of the threads. I’m trying to determine which thread is throwing the exception, but the NOE seems to drift between the threads.

When we output the “CurrentMethodName”, we know where we were called from, but I can’t find a way to determine which thread is throwing the NOE as the are all started in the same method. Is there something like CurrentMethodName for threads that we can trap in the app’s UnhandledException event handler?

I may have found what I can use - App.CurrentThread.ThreadID or App.CurrentThread.DebugIdentifier.

Thanks, Michel.

It looks like the Thread.DebugIdentifier does that for you directly.