using System; delegate void Foo (); interface IFoo { void Test (); } class X : IFoo { void IFoo.Test () { Foo foo = delegate { Console.WriteLine (1); }; foo (); } } class M { public static void Main () { IFoo x = new X (); x.Test (); } }