Skip to content

Instantly share code, notes, and snippets.

@paulbatum
Created May 27, 2011 02:49
Show Gist options
  • Save paulbatum/994550 to your computer and use it in GitHub Desktop.
Save paulbatum/994550 to your computer and use it in GitHub Desktop.
This is just one reason why we need interface inheritance
IList<string> list = new [] { "I", "declare", "you", "are", "mistaken", "sir" };
IEnumerable<string> youProposeIShouldNotBeAbleToDoThis = list;
// For the above code to work, IList<T> must inherit from IEnumerable<T>, i.e. interface inheritance must exist.
@jcbozonier
Copy link

So really you're for Interface segregation. I agree. In this case it seems like Command/Query separation. Happens a lot.

@paulbatum
Copy link
Author

I think I would understand better if you present A) this is how it was B) this is how it should be

@skoon
Copy link

skoon commented May 27, 2011

Yeah that's pretty much it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment