title: How To Get All Tweets on Hashtag using LinqToTwitter
body: <p>I'm trying to get all tweets(count total tweet number) belong to hashtag. My function is here, how to I use maxID and sinceID for get all tweets. What is the instead of "count"? I dont'know.</p>
  
  <pre><code>if (maxid != null)
          {
              var searchResponse =
                  await
                  (from search in ctx.Search
                   where search.Type == SearchType.Search &amp;&amp;
                   search.Query == "#karne" &amp;&amp;
                   search.Count == Convert.ToInt32(count)
                   select search)
                   .SingleOrDefaultAsync();
  
              maxid = Convert.ToString(searchResponse.SearchMetaData.MaxID);
  
              foreach (var tweet in searchResponse.Statuses)
              {
                  try
                  {
                      ResultSearch.Add(new KeyValuePair&lt;String, String&gt;(tweet.ID.ToString(), tweet.Text));
                      tweetcount++;
                  }
                  catch {}
              }
  
              while (maxid != null &amp;&amp; tweetcount &lt; Convert.ToInt32(count))
              {
                  maxid = Convert.ToString(searchResponse.SearchMetaData.MaxID);
                  searchResponse =
                      await
                      (from search in ctx.Search
                       where search.Type == SearchType.Search &amp;&amp;
                       search.Query == "#karne" &amp;&amp;
                       search.Count == Convert.ToInt32(count) &amp;&amp; 
                       search.MaxID == Convert.ToUInt64(maxid)
                       select search)
                       .SingleOrDefaultAsync();
                  foreach (var tweet in searchResponse.Statuses)
                  {
                      try
                      {
                          ResultSearch.Add(new KeyValuePair&lt;String, String&gt;(tweet.ID.ToString(), tweet.Text));
                          tweetcount++;
                      }
                      catch { }
                  }
              }
  
          }
  </code></pre>