Skip to content

Instantly share code, notes, and snippets.

@tnngo2
Created April 13, 2012 04:29
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 tnngo2/7856dad9ccfe58aaa0da to your computer and use it in GitHub Desktop.
Save tnngo2/7856dad9ccfe58aaa0da to your computer and use it in GitHub Desktop.
interface ITerrestrialAnimal
{
void Eat();
}
interface IMarineAnimal
{
void Swim();
}
class Crocodile:ITerrestrialAnimal, IMarineAnimal
{
static void Main(string[] args)
{
Crocodile objCrocodile = new Crocodile();
objCrocodile.Eat();
objCrocodile.Swim();
}
public void Eat()
{
Console.WriteLine("The crocodile eats flesh");
}
public void Swim()
{
Console.WriteLine("The crocodile can swim");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment