Can you leverage lambda's/closure to ignore the other parameters and just call the method how you want it with the values you want?
ThreadPool.RegisterWaitForSingleObject(
_stop,
(state, timeout) => MyCallBackMethod("ABC123"),
null,
5000,
true);
Or if your MyCallBackMethod
does take the state
and timeout
event arguments:
ThreadPool.RegisterWaitForSingleObject(
_stop,
(state, timeout) => MyCallBackMethod(state, timeout, "ABC123"),
null,
5000,
true);