using System.Collections.Generic;
namespace AdjustTimeoutBasedOnRetry
public static void Main(string[] args)
DisplayMaxForEmptyList();
DisplayMaxForEmptyListWithDefault();
private static void DisplayMaxForEmptyList()
var items = new List<int>();
Console.WriteLine("Exception: " + ex.Message);
private static void DisplayMaxForEmptyListWithDefault()
var items = new List<int>();
var max = items.DefaultIfEmpty().Max();
Console.WriteLine("Exception: " + ex.Message);