Skip to content

Instantly share code, notes, and snippets.

@DevJohnC
Created April 18, 2013 15:21
Show Gist options
  • Select an option

  • Save DevJohnC/5413592 to your computer and use it in GitHub Desktop.

Select an option

Save DevJohnC/5413592 to your computer and use it in GitHub Desktop.
class SomeThing
{
public SomeThing(IFoo foo, IBar bar)
{
}
}
interface IFoo {}
interface IBar {}
class Foo : IFoo {}
class Bar : IBar {}
Activator.CreateInstance(typeof(SomeThing), new Foo(), new Bar()); // exception
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment