steelyeyedview.com
Steely Eyed ViewMonday, October 24, 2011. The Danger of Extension Methods. Today I came across something with extension methods that can cause code to break. If an extension method’s signature is equivalent to an actual method on the class or interface the extension method will not be called. For example let say I have the following classes:. Some slightly different implementation. Will never be called unless you call it as FooExtensions.FindItem(foo, id);. I discovered this the hard way. Interface and renamed GetItem.
http://www.steelyeyedview.com/