Generic extension method with multiple constraints

Posted on Wed 18 January 2012 in Coding • Tagged with constraints, extension methods, generics

In a .NET project, I was coding an extension method for forms, and for various reasons I needed to call a form method which came from an interface. Instead of coding an ugly type check and subsequent type cast, I was happy to discover that I could simply create a …


Continue reading