title: How can I remove messages from a queue?
body: <p>I have messages that get stuck in queue and I am looking for a way to programmatically remove them.</p>
  
  <p>Is there a way to remove messages from a queue if it has been sitting for more than x days?
  I can connect and delete a queue like this, but not sure how to remove individual messages.</p>
  
  <pre><code>MessageQueue queue = new MessageQueue(@".\private$\SomeTestName");
  //queue.Purge(); //deletes the entire queue
  try
  {
      // Peek and format the message. 
      Message m = myQueue.Peek();
  
     // Display message information.
     Console.WriteLine("Sent time {0}", m.SentTime);
     Console.WriteLine("Arrived time {0}", m.ArrivedTime);
  }
  </code></pre>