CSharp · Console
using System;
using System.Collections.Generic;
using System.Linq;
public class Program
{
public static void Main()
{
Console.WriteLine("Hello World");
Values<int>();
Values(2,11,2,8);
Values(new int[]{1,2,3});
Values(Enumerable.Range(3, 19).ToList());
}
public static List<T> Values<T>(IEnumerable<T> ts)
{
return new List<T>();
}
public static List<T> Values<T>(params T[] ts)
{
return Values<T>(ts.ToList()); // Without ToList() => endless recursion and stack overflow
}
}