title: How to return value from Dispatcher.Invoke,Which uses delegate function as parameter
body: <p><strong>Delegate Declaration</strong> 
  <br></p>
  
  <pre><code> delegate bool newDelegate(ref byte[] b,COMMAND req);
  </code></pre>
  
  <p><br>
  <strong>Dispatcher Call</strong><br></p>
  
  <pre><code>Dispatcher.CurrentDispatcher.Invoke( new newDelegate(MainWindow.processBuffer), b, request);
  </code></pre>
  
  <p><br>I am trying to invoke a function <strong>processBuffer</strong> that processes the sent buffer and updates the UI and on completion it should return success or failure status as <code>bool</code> value.
  I am using the following syntax to invoke the function. <br><br>
  <strong>Syntax:</strong> <br>
  <strong>public object Invoke (Delegate method, params object[] args)</strong>
  <br><br>
  How do i access the returned value ?Am i missing anything?Or doing it wrong?</p>