There is some black magic code in c# where you can define the default implementation of an interface.
So you can write
var instance = new ISomeInterface();
Any pointers?
UPDATE 1: Note that is did not ask if this is a good idea. Just how was it possible to do it.
UPDATE 2: to anyone seeing the accepted answer.
- "this should be treated merely as a curiosity." from Marc Gravel http://stackoverflow.com/questions/1303717/newing-up-interfaces
- "It's a bad idea to use a tool designed for COM interop to do something completely and utterly different. That makes your code impossible to understand for the next guy who has to maintain it" from Eric Lippert http://stackoverflow.com/questions/1303717/newing-up-interfaces
- "While it may work, if it were ever found in production code by a rational coder, it would be refactored to use a base class or dependency injection instead." from Stephen Cleary in a comment below.