private void TrySetLongValue(Field f) { try { f.SetInt64Value(long.MaxValue); Assert.Fail(); } catch (Exception expected) when(expected.IsIllegalArgumentException()) { // expected } }
private void TrySetLongValue(Field f) { try { f.SetInt64Value(long.MaxValue); Assert.Fail(); } #pragma warning disable 168 catch (System.ArgumentException expected) #pragma warning restore 168 { // expected } }