title: MessageQueue and Async / Await
body: <p>I only want to receive my message in a async method! and its freezing my UI</p>
  
  <pre><code>    public async void ProcessMessages()
      {
          MessageQueue MyMessageQueue = new MessageQueue(@".\private$\MyTransactionalQueue");
          MyMessageQueue.Formatter = new XmlMessageFormatter(new Type[] { typeof(string) });
  
          while (true)
          {
              MessageQueueTransaction MessageQueueTransaction = new MessageQueueTransaction();
              MessageQueueTransaction.Begin();
  
              ContainError = false;
              ProcessPanel.SetWaiting();
  
              string Body = MyMessageQueue.Receive(MessageQueueTransaction).Body.ToString();
  
              //Do some process with body string.
  
              MessageQueueTransaction.Commit();
          }
      }
  </code></pre>
  
  <p>I am just calling the method like any regular method and its nos working! 
  This code used to work when i was using BackgroundWorkers instead of async/await</p>
  
  <p>Ideas?</p>