FirstOrDefault

Returns a single element sequence containing either the first element of the given sequence, if any, or a default value of the same type.

Syntax

Sequence.FirstOrDefault
   ·  [sequence]

Parameters

sequence
The sequence to return the first element from, if any.

Return Value

A sequence containing a single element.