public void NonGenericInterface_WithEvent() { dynamic d = new ExplicitlyImplementedInterfaceWithEvent(); Assert.Throws<RuntimeBinderException>(() => d.Event += (Func<int, int>)(y => y)); Assert.Throws<RuntimeBinderException>(() => d.Event -= (Func<int, int>)(y => y)); var x = Helpers.Cast<InterfaceWithEvent>(d); }
public void NonGenericInterface_WithEvent() { dynamic d = new ExplicitlyImplementedInterfaceWithEvent(); Assert.Throws <RuntimeBinderException>(() => d.Event += (Func <int, int>)(y => y)); Assert.Throws <RuntimeBinderException>(() => d.Event -= (Func <int, int>)(y => y)); var x = Helpers.Cast <InterfaceWithEvent>(d); }