using System.Collections.Generic;
public static void Main()
var foods = new[] { "Pizza", "Chicken", "Cheese" };
DoSomething<String[]>(foods);
DoSomething(foods as IEnumerable<string>);
DoSomething<string>(foods);
public static void DoSomething<T>(T value) { Console.WriteLine("A"); Console.WriteLine(typeof(T));}
public static void DoSomething<T>(IEnumerable<T> value) { Console.WriteLine("B"); Console.WriteLine(typeof(T));}