title: LINQ - FirstOrDefault() then Select()
body: <p>I have the following LINQ query that fires an exception when the <code>FirstOrDefault()</code> returns null. Ideally I would like to avoid the null check. Is there a way to do this? I wish to return <code>0</code> if there are no <code>CPOffsets</code> that satisfy the <code>FirstOrDefault()</code> call.</p>
  <pre><code>double offset = OrderedOffsets.FirstOrDefault(o =&gt; o.OffsetDateTime &gt; cpTime).CPOffset;
  </code></pre>
  <p>The only way I can see to achieve this is the following:</p>
  <pre><code>CPOffset cpOffset = OrderedOffsets.FirstOrDefault(o =&gt; o.OffsetDateTime &gt; cpTime);
  double offset = cpOffset != null ? cpOffset.CPOffset : 0;
  </code></pre>
  <p>Is there another more succinct way? Using <code>Select()</code> after the <code>FirstOrDefault()</code> doesn't compile but I thought might be appropriate here?</p>