Skip to content

Instantly share code, notes, and snippets.

@ThiagoBarradas
Last active March 1, 2021 02:11
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 ThiagoBarradas/24eccdcb162e8a54200cdf8cb6a2f9a9 to your computer and use it in GitHub Desktop.
Save ThiagoBarradas/24eccdcb162e8a54200cdf8cb6a2f9a9 to your computer and use it in GitHub Desktop.
SOLID [I] - Interfaces Example with Inheritance
public interface IMovable
{
void Move(long x, long y, long z);
}
public interface IHuman : IMovable
{
string Name { get; set; }
string Document { get; set; }
long Age { get; set; }
void Speak(string message);
}
public interface IAnimal : IMovable
{
string Name { get; set; }
string Type { get; set; }
void EmitSound();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment