using System; using System.Text; namespace myInterfaces { // a dancer in a silly dress public interface IBallerina { void Spin(int RPM); bool NeedToCutToe(int ShoeSize); } // Felis catus public interface ICat { bool NeedsShave(); void Spin(int RPM); } // A Felis catus in a silly dress public class myDancingKitten : IBallerina, ICat { void IBallerina.Spin(int RPM) { Console.WriteLine("screeeeeeeech!!!!"); } void ICat.Spin(int RPM) { Console.WriteLine("purr purr..."); } public void Spin(int RPM) { Console.WriteLine("purr screeeeeeeech!!!!"); } public bool NeedsShave() { // // shaving cats is fun, right? // http://www.snopes.com/photos/animals/lioncut.asp // return true; } public bool NeedToCutToe(int ShoeSize) { // all cats have very small feet return false; } } static class Program { static void PlayWithBallerina(IBallerina balle) { balle.Spin(216); } static void PlayWithCat(ICat kitty) { kitty.Spin(666); } // if I ever get a kitten that can danse I'll call it Belzeebub static void PlayWithMyDancingKitten(myDancingKitten Belzeebub) { Belzeebub.Spin(314); } static void Main(string[] args) { myDancingKitten Belzeebub = new myDancingKitten(); PlayWithBallerina(Belzeebub); PlayWithCat(Belzeebub); PlayWithMyDancingKitten(Belzeebub); Console.Write("Press Andy to continue . . . ."); Console.ReadKey(); } } }