title: C# AWS SQS Read all messages without deleting
body: <p>I want  to read all messages from queue in AWS SQS without deleting them , using C# , but I am only getting the single last message.</p>
  
  <p>Here is the code</p>
  
  <pre><code> ReceiveMessageRequest rmr = new ReceiveMessageRequest();
          rmr.QueueUrl = url;
          rmr.MaxNumberOfMessages = 10;
          AmazonSQSClient sq = new AmazonSQSClient("xx", "yy");
          ReceiveMessageResponse rmrep = sq.ReceiveMessage(rmr);
          ReceiveMessageResult rmres = rmrep.ReceiveMessageResult;
          //DeleteMessageRequest dmr = new DeleteMessageRequest();
  
          string msgid = "";
          string rephandle = "";
          XmlDocument xl = new XmlDocument();
  
          for (int i = 0; i &lt; rmres.Message.Count;i++ )
          {
              rmrep = sq.ReceiveMessage(rmr);
              rmres = rmrep.ReceiveMessageResult;
              object y = JsonConvert.DeserializeObject&lt;object&gt;(rmres.Message[0].Body);
             int z= y.add();
             MessageBox.Show(z.ToString());
          }
  </code></pre>