title: Linq if/else condition?
body: <p>I know this will probably be a newbie question. Is there a way to choose different search criteria depending on the bool value? Later in the code, I want to loop through the object (alDisabledPrograms). I know the if/else is not correct, I put that in there to show how I'd like that to be handled. I attempted to place this inside a larger if/else condition but was unable to loop through alDisabledPrograms later. Thoughts? </p>
  
  <pre><code>var alDisabledPrograms = xlServerRoles.Descendants("ServerRole")
      if(isDup)
      {
          .Where(dp =&gt; dp.Element("ServerType").Value == currentColumn.Substring(0, currentColumn.Length - 1))
      }
      else
      {
          .Where(dp =&gt; dp.Element("ServerType").Value == currentColumn)
      }
      .Descendants("ProgramName")
      .Select(p =&gt; p.Value)
      .ToList();
  </code></pre>