title: How can I safely loop until there is nothing more to do without using a "placeholder" while conditon?
body: <p>In order to call my Web API method until no more data is returned (I'm fetching it in batches, to keep each result set small, due to the 98-lb-weakling persona of the client (Windows CE handheld device)), I'm using this code:</p>
  
  <pre><code>while (moreRecordsExist)
  {
      redemptionsList.redemptions.Clear();
      string uri = String.Format("http://platypus:28642/api/Redemptions/{0}/{1}", lastIdFetched, RECORDS_TO_FETCH);
      var webRequest = (HttpWebRequest)WebRequest.Create(uri);
      webRequest.Method = "GET";
  
      using (var webResponse = (HttpWebResponse)webRequest.GetResponse())
      {
          if (webResponse.StatusCode == HttpStatusCode.OK)
          {
              var reader = new StreamReader(webResponse.GetResponseStream());
              string s = reader.ReadToEnd();
              var arr = JsonConvert.DeserializeObject&lt;JArray&gt;(s);
              if (null == arr) break;
  
              foreach (JObject obj in arr)
              {
                  id = obj.Value&lt;int?&gt;("Id") ?? 0;
                  var _redemptionId = obj.Value&lt;string&gt;("RedemptionId") ?? "";
                  var _redemptionItemId = obj.Value&lt;string&gt;("RedemptionItemId") ?? "";
                  var _redemptionName = obj.Value&lt;string&gt;("RedemptionName") ?? "";
                  double _redemptionAmount = obj.Value&lt;double?&gt;("RedemptionAmount") ?? 0.0;
                  var _redemptionDept = obj.Value&lt;string&gt;("RedemptionDept") ?? "";
                  var _redemptionSubdept = obj.Value&lt;string&gt;("RedemptionSubDept") ?? "";
  
                  redemptionsList.redemptions.Add(new HHSUtils.Redemption
                  {
                      Id = id,
                      RedemptionId = _redemptionId,
                      RedemptionItemId = _redemptionItemId,
                      RedemptionName = _redemptionName,
                      RedemptionAmount = _redemptionAmount,
                      RedemptionDept = _redemptionDept,
                      RedemptionSubDept = _redemptionSubdept,
                  });
              } // foreach
          } // if ((webResponse.StatusCode == HttpStatusCode.OK) &amp;&amp; (webResponse.ContentLength &gt; 2))
      } // using HttpWebResponse
      int recordsAdded = LocalDBUtils.BulkInsertRedemptions(redemptionsList.redemptions);
      totalRecordsAdded += recordsAdded;
      //moreRecordsExist = (recordsToFetch &gt; (totalRecordsAdded));
      lastIdFetched = id;
  } // while
  </code></pre>
  
  <p>This works (if I check webResponse for null, it crashes with a NullReferenceException), but I don't really like my while loop, as it is never reached once moreRecordsExist is assigned false. So, I set the Resharper hounds loose on it to see if it had a better suggestion, but it just tells me, "Expression is always true" for that line, and the suggested "fix" for this is to change it to "while (true)"</p>
  
  <p>I fail to see how that is much of an improvement, though.</p>
  
  <p>Is there a way I can accomplish the same thing with a more sensible construct?</p>