passing Multiple conditions to LINQ FirstOrDefault Method
<p>I have a list of <code>gelolocations</code>. I want to perform 2 conditions on the list and select the ones which satisfy those conditions. I cannot figure out how to do that.</p>

<pre><code>public class GeolocationInfo
{
    public string Postcode { get; set; }

    public decimal Latitude { get; set; }

    public decimal Longitude { get; set; }
}

var geolocationList = new List&lt;GeolocationInfo&gt;(); // Let's assume i have data in this list
</code></pre>

<p>I want to perform multiple conditions on this list <code>geolocationList</code>.</p>

<p>I want to use <code>FirstOrDefault</code> on this list on the conditions that <code>PostCode</code> property matching with the one supplied and Longitude, lattitude are not null. </p>

<pre><code>    geolocationList .FirstOrDefault(g =&gt; g.PostCode  == "AB1C DE2"); 
// I want to add multiple conditions like  g.Longitude != null &amp;&amp; g.Lattitude != null in the same expression
</code></pre>

<p>I want to build this <code>conditions</code> outside and pass it as a parameter to <code>FirstOrDefault</code>.  e.g like building a <code>Func&lt;input, output&gt;</code> and passing this into.</p>