title: How to get item from IEnumerable collection using its index in C#?
body: <p>I have <code>IEnumerable</code> list of <code>customerList</code> and index. Now I want to get item of <code>IEnumerable</code> based on index.</p>
  
  <p>For example, if <code>index = 3</code>, it should provide me 3rd item of the IEnumerable .</p>
  
  <p>Please guide.</p>
  
  <pre><code>IEnumerable&lt;Customer&gt; customerList = new Customer[] 
  { 
       new Customer { Name = "test1", Id = 999 }, 
       new Customer { Name = "test2", Id = 915 }, 
       new Customer { Name = "test8", Id = 986 },
       new Customer { Name = "test9", Id = 988 },
       new Customer { Name = "test4", Id = 997 },
       new Customer { Name = "test5", Id = 920 },
  };
  
  int currentIndex = 3;   //want to get object Name = "test8", Id = 986
  </code></pre>