Created
August 10, 2016 02:34
-
-
Save gulbanana/7f28d9301538edcde7631617720c3a1c 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; | |
class A | |
{ | |
public string ToUpper() => "A"; | |
} | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("s".ToUpper()); // prints "S" | |
What("s"); | |
What(new A()); | |
} | |
static void What(dynamic x) | |
{ | |
Console.WriteLine(x.ToUpper()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment