-
-
Save bradphelan/9fddca0fa5f1c07ba736 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
class Program | |
{ | |
public static string Foo<T>( params T[] items) | |
{ | |
return "A"; | |
} | |
public static string Foo<T>(IEnumerable<T> items) | |
{ | |
return "B"; | |
} | |
static void Main() | |
{ | |
List<int> items = new List<int>(){0,1,23}; | |
Console.WriteLine(Foo(items)); | |
Console.WriteLine(Foo("XXX")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running this outputs
rather than