public static void DynamicInvoke_CastingDefaultValues() { { // Passing Type.Missing without providing default. Delegate d = new DFoo1(Foo1); Assert.Throws <ArgumentException>(() => d.DynamicInvoke(7, Type.Missing)); } { // Passing Type.Missing with default. Delegate d = new DFoo1WithDefault(Foo1); d.DynamicInvoke(7, Type.Missing); } }
public static void DynamicInvoke_CastingDefaultValues() { { // Passing Type.Missing without providing default. Delegate d = new DFoo1(Foo1); Assert.Throws<ArgumentException>(() => d.DynamicInvoke(7, Type.Missing)); } { // Passing Type.Missing with default. Delegate d = new DFoo1WithDefault(Foo1); d.DynamicInvoke(7, Type.Missing); } }