title: "Enumeration yielded no results" when there is clearly a result
body: <p>I'm troubleshooting an old application and having a hard time understanding why a variable isn't entering a foreach loop. My problem is that I have very limited experience dealing with Generics/Collections/LINQ.  Please excuse me if this is an elementary question.</p>
  
  <p>I have the following variable:</p>
  
  <pre><code>var allegationlist = allegation.Where(x =&gt; x.DaType == datype.FirstOrDefault().IntakeServReqTypeKey &amp;&amp; x.DaSubType == subtypedetail.FirstOrDefault().ClassKey &amp;&amp; x.DaNumber == daNumber);
  </code></pre>
  
  <p>when I mouse over each element in the where statement, they all have values. Example:</p>
  
  <pre><code>x.DaType == datype.FirstOrDefault().IntakeServReqTypeKey has a value of "Complaint-DSDS"
  
  x.DaSubType == subtypedetail.FirstOrDefault().ClassKey has a value of "IHS"
  
  x.DaNumber == daNumber has a value of "201706218360"
  </code></pre>
  
  <p>However, if I mouse over allegationlist, the Result View states "Enumeration yielded no results". </p>
  
  <p>When I look into the base, Current is null as is System.Collections.IEnumerator.Current.</p>
  
  <p>When I look into enumerator, Current is null and System.Collections.IEnumerator.Current is  </p>
  
  <pre><code>System.Collections.IEnumerator.Current  '((System.Linq.Enumerable.WhereListIterator&lt;CaseCompass.Intake.NewIntakeHelper.AllegationHelper&gt;)allegationlist).enumerator.System.Collections.IEnumerator.Current' threw an exception of type 'System.InvalidOperationException'   object {System.InvalidOperationException}
  </code></pre>
  
  <p>If I drill into System.Collections.IEnumerator.Current the base states:</p>
  
  <pre><code>{"Enumeration has either not started or has already finished."} System.SystemException {System.InvalidOperationException} 
  </code></pre>
  
  <p>and the Stack Trace states:</p>
  
  <pre><code>    StackTrace  "   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)\r\n   at System.Collections.Generic.List`1.Enumerator.System.Collections.IEnumerator.get_Current()"    string
  </code></pre>
  
  <p>There is also a list section with the following information:</p>
  
  <pre><code>[0] {CaseCompass.Intake.NewIntakeHelper.AllegationHelper}   CaseCompass.Intake.NewIntakeHelper.AllegationHelper
          AllegationId    {58323453-1ee3-4cef-ba2a-e1da6fd95c16}  System.Guid
          AllegationName  "Contract"  string
          DaNumber    "201706218360"  string
          DaSubType   "In-Home Services"  string
          DaType  "Complaint-DSDS"    string
          GridRowIndex    0   int
          Indicators  Count = 1   System.Collections.Generic.List&lt;string&gt;
          ParentGridRowIndex  0   int
          SubtypeId   "bf713051-359a-4091-9f0f-afa5019304e9"  string
          Typeid  "3cdc658e-947c-497c-8fb1-2bb9dc026baa"  string
  </code></pre>
  
  <p>This same information is also found in the source section</p>
  
  <p>I've Googled the various error messages but I'm not experienced enough to relate what I'm reading with my code.  </p>