Пример #1
0
 private void TrySetLongValue(Field f)
 {
     try
     {
         f.SetInt64Value(long.MaxValue);
         Assert.Fail();
     }
     catch (Exception expected) when(expected.IsIllegalArgumentException())
     {
         // expected
     }
 }
Пример #2
0
        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
            }
        }