FirstOrDefault - Simple

Query
public void Linq61()
{
int[] numbers = { };

int firstNumOrDefault = numbers.FirstOrDefault();

Console.WriteLine(firstNumOrDefault);
}
Lambda Expression
public void Linq61()
{
int[] numbers = { };

int firstNumOrDefault = numbers.FirstOrDefault();

Console.WriteLine(firstNumOrDefault);
}
Output
0
Related Tutorial