class Program { static void Main(string[] args) { // Call the display interface Test t = new Test(); // Call the test1.run method ((ITest1)t).Run(); // Call the test2.run method ((ITest2)t).Run() ; Console.Read(); } }
public interface ITest1 { void Run(); } public interface ITest2 { void Run(); } public class Test : ITest1, ITest2 { void ITest1.Run() { Console.WriteLine( " Implemented the RUN method of Test1 " ); } void ITest2.Run() { Console.WriteLine( " Implemented the RUN method of Test2 " ); } }