In C#, is there any method to get the cpu id (or core number) of the core that is executing a thread? I have a quad core processor and I wanted to know that on spanning some threads, which cores do they get alloted?
I found out that System.Environment.ProcessorCount gives the total number of cpus present, but is there any way to know which specific cpu instance is executing a given thread.