CSharp · Console
using System;
namespace Program
{
public class Program
{
public static void Main(string[] args)
{
Foo foo = new Baz();
foo.Method();
}
}
interface Foo
{
void Method();
}
class Bar
{
public void Method()
{
Console.WriteLine("Bar!");
}
}
class Baz : Bar, Foo
{
}
}