using System;
public class Program
{
public static void Main()
IFoo smth = new SomeFooClass();
Console.WriteLine(smth.Square(5));
}
public interface IFoo
public int Square(int x)
return x*x;
public class SomeFooClass: IFoo