Created
March 20, 2015 06:18
-
-
Save dha-lo-jd/f8ce78f58c7201e872bf 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
Action<string> a = s => { }; | |
Action<string> b = s => { }; | |
var d = new Dictionary<Action<string>, string>(); | |
d.Add(a, "a"); | |
d.Add(b, "b"); | |
Assert.IsTrue(a.Equals(a)); | |
Assert.IsFalse(a.Equals(b)); | |
Assert.AreEqual("a", d[a]); | |
Assert.AreEqual("b", d[b]); | |
try | |
{ | |
Assert.AreEqual("a", d[s => { }]); | |
Assert.Fail(); | |
} | |
catch (Exception) | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment