using System;
public class Program
{
interface IFoo {
void DoSomething() {
Console.WriteLine("Foo");
}
interface IBar : IFoo {
void IFoo.DoSomething() {
Console.WriteLine("Bar");
interface IBaz : IFoo {
struct BarImpl : IBar {
struct BazImpl : IBaz {
public static void Main()
(new BarImpl{} as IBar).DoSomething();
(new BarImpl{} as IFoo).DoSomething();
(new BazImpl{} as IFoo).DoSomething();