Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis
Created July 13, 2018 21:32
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 gdyrrahitis/922d1b12043bc18c76a23e22bbcdc067 to your computer and use it in GitHub Desktop.
Save gdyrrahitis/922d1b12043bc18c76a23e22bbcdc067 to your computer and use it in GitHub Desktop.
public class Implementor {
private readonly IParentInterface _parent;
public Implementor (IParentInterface parent) {
_parent = parent;
}
public void DoWork () {
// Do work with parent interface method
_parent.ParentWork ();
// Do work with child interface method
((IChildInterface) _parent).ChildWork ();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment