title: Lambda Where Clause Error
body: <p>I'm trying to write a lambda like below but my syntax is incorrect.</p>
  
  <pre><code>Result = ListOfNumbers.Where(val =&gt; { val != Num1; val != Num2; }).ToList()[0];
  </code></pre>
  
  <p>The error I get is</p>
  
  <blockquote>
    <p>Not all code paths return a value in lambda expression of type
    'System.Func<code>&lt;int,int,bool&gt;</code>'</p>
  </blockquote>
  
  <p>Perhaps there's a better way of doing this... I know there's the numbers 1, 2 and 3 (in that order) in ListOfNumbers. Num1 and Num2 at this point will both be either 1, 2 or 3 (they can't be the same though). I want my result to be the 'other' number from ListOfNumbers. Hope that's clear. If you can think of a neater way of doing it I'd love to hear it.</p>
  
  <p>Any thoughts?</p>