Get Current ID In Task Object (C#)
Doing some research on Task (TPL) i wonder if there's a way in retrieving the id of the current task executing. In thread, we can do it like this:
The equivalent code in task is shown below:
Greg
Thread.CurrentThread.Name;
int currentTask = Task.CurrentId;
Comments
Post a Comment