title: Dispatcher.BeginInvoke Code Paths Error in C#
body: <p>I am having a problem with a bit of code in a piece of software that I am currently developing. </p>
  
  <pre><code>this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Background, new System.Windows.Threading.DispatcherOperationCallback(delegate
  {
      AccountSyncOptions getData = new AccountSyncOptions(syncProgress, lblStatus, tblLogins, cboFilter, searching, searchString, btnClearSearch);
      getData.retrieveLocalData();
      getData.retrieveOnlineData();
  }), null);
  </code></pre>
  
  <p>When I put the code above in an error appears which says 'Not all code paths return a value in anonymous method of type 'System.Windows.Threading.DispatcherOperationCallBack. </p>