using System;
public class Program
{
public static void Main()
MyClass cls = new MyClass();
cls.DoSomething();
IMyInterface inInterface = cls;
inInterface.DoSomething();
}
interface IMyInterface
void DoSomething();
class MyClass : IMyInterface
public void DoSomething()
Console.WriteLine("Do Something.");