title: Get index of matching value in List using LINQ
body: <p>I would like to be able to run a LINQ query on a BindingList(Of T) that returns the <em>indexes</em> where a list object member is equal to a particular value.</p>
  
  <p>say I have a list of simple objects of class widget:</p>
  
  <pre><code>Public Class widget
      Public Property foo As Integer
      Public Property bar As String
  End Class
  Dim widgetList As BindingList(Of widget)
  </code></pre>
  
  <p>I'd like to be able to query the list some thing like the below:</p>
  
  <pre><code>Dim test As Integer = 5
  Dim index = (From i In widgetList
               Where i.foo = test
               Select i.index).First
  </code></pre>
  
  <p>Such that index contains the index of the first listItem where widgetList.Item(index).foo = 5. What is the best way to do this? (Or should I even be using LINQ)</p>
  
  <p>I have seen several C# methods to do this but Im not sufficiently au fait with C# to understand how to use them in VB</p>