C# Generic Method Resolution Gotcha

Tuesday, August 19, 2014

Yesterday, I broke some unit tests after removing an unused type parameter from a method, which seemed like a small and harmless code modification. Well, it turns out that it isn’t. If you want to know why, keep reading. Consider the following code snippet: 1: 2: public class Tests 3: { 4: 5: public void Test() 6: { 7: Assert.AreEqual("Int", DoSomething(1));...
tags: , ,
no comments