Saturday, April 18, 2009

Instatiating an Interface

Recently, I found out that there is a way for “Instantiating an interface” in C#. Here is the code.

interface IFoo
class Foo : IFoo

static void Main(string[] args)
    // Instatiating an Interface --- This works
    IFoo foo = new IFoo();

Please let me know your comments.

No comments:

Post a Comment