Created
February 8, 2015 11:02
-
-
Save ufcpp/bb6df875713de68feda9 to your computer and use it in GitHub Desktop.
overload resolution: betterness rule
This file contains hidden or 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 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