Get Range from IEnumerable - CSharp System.Collections.Generic

CSharp examples for System.Collections.Generic:IEnumerable

Description

Get Range from IEnumerable

Demo Code


using System.Collections.Generic;
using System.Collections;
using System;// w ww  . j av a2 s  . com

public class Main{
    public static IList<T> GetRange<T>(IEnumerable<T> list, int index, int count)
    {
      List<T> intermediate = new List<T>(list);
      return intermediate.GetRange(index, count);
    }
}

Related Tutorials