Determining if there is data left after fetching a page of data
You should be aware that 

return (new ArraySegment&lt;T&gt;(data, 0, count), data.Length &gt; count);

throws an exception if count &gt; data.Count()

The normal Take() doesn't behave that way - it takes min(count, data.Count())



One way to go could be:

public static IEnumerable&lt;T&gt; TakeWithRemainder&lt;T&gt;(this IEnumerable&lt;T&gt; sequence, int count, out bool hasMoreData)
{
  bool moreData = false;

  IEnumerable&lt;T&gt; Iter()
  {
    int i = 0;
    foreach (T value in sequence)
    {
      if (i &lt; count)
      {
        yield return value;
      }
      else
      {
        moreData = true;
        yield break;
      }
      i++;
    }
  }

  var result = Iter().ToList();
  hasMoreData = moreData;
  return result;
}




Another way could be:

public static IEnumerable&lt;T&gt; TakeWithRemainder&lt;T&gt;(this IEnumerable&lt;T&gt; sequence, int count, out bool hasMoreData)
{
  hasMoreData = sequence.Skip(count).Any();
  return sequence.Take(count);
}




Or if you want to take a sub sequence not at the start:

public static IEnumerable&lt;T&gt; TakeWithRemainder&lt;T&gt;(this IEnumerable&lt;T&gt; sequence, int skip, int count, out bool hasMoreData)
{
  sequence = sequence.Skip(skip);
  hasMoreData = sequence.Skip(count).Any();
  return sequence.Take(count);
}




Or if you want to take page number n of m:

public static IEnumerable&lt;T&gt; TakeWithRemainder&lt;T&gt;(this IEnumerable&lt;T&gt; sequence, int page, int count, out bool hasMoreData)
{
  sequence = sequence.Skip(page * count);
  hasMoreData = sequence.Skip(count).Any();
  return sequence.Take(count);
}