C# Enumerable from single or no arguments

Date: 2019-12-03
public static IEnumerable<T> Select<T>(params T[] args) => args;
public static List<T> List<T>(params T[] args) => args.ToList();

// return empty enumerable
return Select<string>(); // or Enumerable.Empty<string>();
// return single value
return Select("A");
// return two values
return Select("A", "B"); // For int: Select(1, 2, 3); or doubles Select(1.0, 2.1, 3.2); 
// For a list
return List("A", "B");

29820cookie-checkC# Enumerable from single or no arguments