using System; using System.Collections.Generic; using System.Linq; public class Test { public static void Main() { List takeMaxmumId = new List(); var max = takeMaxmumId.Select(x=>x).DefaultIfEmpty((ushort)1).Max(); } }