title: What is wrong in this LINQ Query, getting compile error
body: <p>I have a list <code>AllIDs</code>:</p>
  
  <pre><code>List&lt;IAddress&gt; AllIDs = new List&lt;IAddress&gt;();
  </code></pre>
  
  <p>I want to do <code>substring</code> operation on a member field <code>AddressId</code> based on a character "_".</p>
  
  <p>I am using below LINQ query but getting compilation error:</p>
  
  <pre><code>AllIDs= AllIDs.Where(s =&gt; s.AddressId.Length &gt;= s.AddressId.IndexOf("_"))
      .Select(s =&gt; s.AddressId.Substring(s.AddressId.IndexOf("_")))
      .ToList();
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Cannot implicitly convert type 'System.Collections.Generic.List&lt;string>' to 'System.Collections.Generic.List&lt;MyCompany.Common.Users.IAddress>'</p>
  </blockquote>