title: Linq to sql select new string
body: <p>So i got this code:</p>
  
  <pre><code>ClassA { List&lt;ClassB&gt; classBList;}
  ClassB { List&lt;ClassC&gt; classCList;}
  ClassC { String ID;}
  
  Dictionary&lt;string,int&gt; dict;
  ClassA MyObject;
  </code></pre>
  
  <p>The keys on the dictionary should match the the ID field on ClassC
  And i wanna do the following query on linq</p>
  
  <pre><code>List&lt;String&gt; matches = (from b in MyObject
                        from c in b.classCList
                        join d in dict
                        on c.ID equals dict.Key
                        select new
                        {
                            c.Value == 0 ? "YES" : "NO"
                        }).ToList();
  </code></pre>
  
  <p>But I'm getting the error: <code>"Invalid anonymous type member ..."</code></p>
  
  <p>The bottomline is ... how can i have a condition within the select new?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>How can i do this query with extended methods?</p>
  
  <p>Any help?
  Ty</p>