title: How to do compound conditions in lambda expression
body: <p>I have following classes:</p>
  
  <pre><code>public class PriceSelectionsResponse
  {
  public Prompts Prompts { get; set; }
  }
  
  public class Prompts
      {
          public List&lt;Prompt&gt; prompt { get; set; }
      }
  
  public class Prompt
      {
          public int code { get; set; }
          public object level { get; set; }
          public object message { get; set; }
          public object details { get; set; }
      }
  </code></pre>
  
  <p>Now I want to use an if condition where I want to check that if any <code>prompt</code> <code>level</code> is equal to "WARN" AND that prompt object also CONTAINS string "HOPPER" in <code>message</code>. How can I do that?</p>
  
  <p>I tried this way, but cant figure out. How can I achieve this?</p>
  
  <pre><code> if(PriceSelectionsResponseRootObject.Response.PriceSelectionsResponse.Prompts.prompt.Any(p =&gt; p.level == "WARN") &amp;&amp; PriceSelectionsResponseRootObject.Response.PriceSelectionsResponse.Prompts.prompt.Where(p=&gt;p.message.contains("Hopper")) {
  
      }
  </code></pre>