Created
April 9, 2013 21:26
-
-
Save slpsys/5349553 to your computer and use it in GitHub Desktop.
Bending the language to my will in the name of science, with presumably horrific consequences.
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; | |
using var = TestBed.MyClass; | |
namespace TestBed | |
{ | |
public class MyClass | |
{ | |
public static implicit operator MyClass(int me) | |
{ | |
return null; | |
} | |
public static implicit operator MyClass(string me) | |
{ | |
return null; | |
} | |
} | |
public class VarTest | |
{ | |
public static void Main() | |
{ | |
var x = 10; | |
x = "hello"; | |
Console.WriteLine(x == null); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment