title: Why I cannot select element by index into an IEnumerable here?
body: <p>normally I am a C# guy, recently I am working on some VB.net code. I just learned that in VB.net you can <a href="https://stackoverflow.com/questions/36933428/why-can-i-access-an-item-in-keycollection-valuecollection-by-index-even-if-it-do">index into an IEnumerable</a>, a little surprise for me, different from C#.</p>
  
  <p>However, in the following code, I found the indexing not working anymore, I don't know why. What's happening here?</p>
  
  <pre><code>Imports System.Linq
  Structure Point
      Public X As Double
      Public Y As Double
  End Structure
  Class Circle
      Public Property Radius As Double
      Public Property Center As Point
  End Class
  Module Module1
      Sub Main()
          Dim Circles() As Circle = {
                  New Circle With {.Radius = 5, .Center = New Point With {.X = 0, .Y = 0}},
                  New Circle With {.Radius = 5, .Center = New Point With {.X = 10, .Y = 10}},
                  New Circle With {.Radius = 10, .Center = New Point With {.X = 10, .Y = 10}},
                  New Circle With {.Radius = 12, .Center = New Point With {.X = 0, .Y = 0}}
                  }
  
          Dim circleGroups = From c In Circles
                          Order By c.Radius
                          Group c By c.Center Into Group
  
          'This is not working, not complile
          Dim doubleCircleGroups1 = From g In circleGroups
                                  Where g.Group.Count() = 2
                                  Select Center = g.Center, ID = g.Group(0).Radius * 2, OD = g.Group(1).Radius * 2
  
          'This is working
          Dim doubleCircleGroups2 = From g In circleGroups
                                  Where g.Group.Count() = 2
                                  Select Center = g.Center, ID = g.Group.ElementAt(0).Radius * 2, OD = g.Group.ElementAt(1).Radius * 2
      End Sub
  End Module
  </code></pre>