I need to search through a list of classes to find the first that matches what I need
<p>I have the following class:</p>

<pre><code>public class TestClass {
   public IList&lt;TestClassDetail&gt; TestClassDetails {
      get { return _testClassDetails; }
   }
   private List&lt;TestClassDetail&gt; _testClassDetails = new List&lt;TestClassDetail&gt;();

   public TestClass() {
      this._testClassDetails = new List&lt;TestClassDetail&gt;();
   }
}

public class TestClassDetail {
   public TestClassDetail() {
      this.Q = String.Empty;
   }
   public string Q { get; set; }
}


var TestClass a = &lt;some code here to create the instace of a&gt;
</code></pre>

<p>Now I need to be able to look at the object a, which in this case has 45 instance of TestClassDetail. I need to check each instance to see the first and only one which has a value of Q that is equal to "xx". If it's the 4th instance then I need to return 4. </p>

<p>Is this something that I could do with LINQ?</p>
