Skip to content

Instantly share code, notes, and snippets.

@pietervp
Created June 29, 2012 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pietervp/3018245 to your computer and use it in GitHub Desktop.
Save pietervp/3018245 to your computer and use it in GitHub Desktop.
class Program
{
static void Main(string[] args)
{
A a = new A();
ITest aAsITest = a.Duck<ITest>();
}
}
public class A
{
string Data { get; set; }
public void Method()
{
}
}
public interface ITest
{
string Data { get; set; }
void Method();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment