title: How to get the latest videos from YouTube watch history
body: <p>I want to get the latest videos from <a href="http://www.youtube.com" rel="nofollow">YouTube</a> watch history. I am using the following code, but the video size is always different and very rarely is equal to 100. How can I resolve this problem?</p>
  
  <pre class="lang-cs prettyprint-override"><code>YouTubeRequestSettings ytSettings = new YouTubeRequestSettings(AppKey, DevKey, currentLogin, currentPassword);
  ytSettings.PageSize = 10;
  ytSettings.AutoPaging = true;
  YouTubeRequest ytRequest = new YouTubeRequest(ytSettings);
  
  string uri = "https://gdata.youtube.com/feeds/api/users/default/watch_history?v=2";
  Feed&lt;Video&gt; videos = ytRequest.Get&lt;Video&gt;(new Uri(uri));
  List&lt;string&gt; vids = new List&lt;string&gt;();
  
  foreach (Video vid in videos.Entries)
  {
      if (vids.Count &lt; 100)
      {
          vids.Add(vid.VideoId.ToString());
      }
      else
      {
          break;
      }
  }
  </code></pre>