Skip to content

Instantly share code, notes, and snippets.

@conanak99

conanak99/i2.cs Secret

Last active May 7, 2016 15:35
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 conanak99/d648a1f48774f6b5c752e19b1a0a2878 to your computer and use it in GitHub Desktop.
Save conanak99/d648a1f48774f6b5c752e19b1a0a2878 to your computer and use it in GitHub Desktop.
public interface IAnimal {
void Eat();
...
void Swim();
void Fly();
}
public class Fish : IAnimal {
public void Eat () {}
...
public void Swim() {}
public void Fly() { throw new Exception("Cá éo biết bay"); }
}
public class Bird : IAnimal {
public void Eat () {}
...
public void Swim() { throw new Exception("Chim éo biết bơi"); }
public void Fly()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment