public static void DynamicInvoke_ConvertNonMatchingTToNullable_ThrowsArgumentException() { Delegate d = new NullableDelegate(NullableMethod); AssertExtensions.Throws <ArgumentException>(null, () => d.DynamicInvoke((short)7)); AssertExtensions.Throws <ArgumentException>(null, () => d.DynamicInvoke(IntEnum.Seven)); }
public static void DynamicInvoke_ConvertNonMatchingTToNullable_ThrowsArgumentException() { Delegate d = new NullableDelegate(NullableMethod); Assert.Throws<ArgumentException>(null, () => d.DynamicInvoke((short)7)); Assert.Throws<ArgumentException>(null, () => d.DynamicInvoke(IntEnum.Seven)); }
public static void DynamicInvoke_ConvertMatchingTToNullable_Succeeds() { Delegate d = new NullableDelegate(NullableMethod); d.DynamicInvoke(7); }