title: How to pass parameters to callback method using RegisterWaitForSingleObject?
body: <p>I'm using a <code>RegisterWaitForSingleObject</code> call in it's basic usage form to call a method upon the timeout value provided and all is working well. However there is a particular scerio I'm using this where the code to call <code>RegisterWaitForSingleObject</code> happens in an event handler and I need to pass the callback method some additional infrmation. Currently the callback method has the following required signature:</p>
  
  <pre><code>public void MyCallBackMethod(object state, bool timedOut)
  </code></pre>
  
  <p>So I <em>can</em> do this technically:</p>
  
  <pre><code>public void MyCallBackMethod(object state, bool timedOut, string SomeValue)
  </code></pre>
  
  <p>However now I don't know which values to send manually for <code>state</code> and <code>timeout</code> when trying to add this value at the time of calling <code>RegisterWaitForSingleObject</code></p>
  
  <pre><code>ThreadPool.RegisterWaitForSingleObject(_stop, MyCallBackMethod(?,?, "ABC123"), null, 5000, true);
  </code></pre>
  
  <p>How can I properly pass additional values to my callback method registered using <code>RegisterWaitForSingleObject</code>?</p>