Skip to content

Instantly share code, notes, and snippets.

@ufcpp
Created February 8, 2015 11:02
Show Gist options
  • Select an option

  • Save ufcpp/bb6df875713de68feda9 to your computer and use it in GitHub Desktop.

Select an option

Save ufcpp/bb6df875713de68feda9 to your computer and use it in GitHub Desktop.
overload resolution: betterness rule
using static System.Console;
class Program
{
static void Main()
{
X(0); // object
X(""); // string
}
static void X(string x) => WriteLine("string");
static void X(object x) => WriteLine("object");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment