Ejemplo n.º 1
0
 private void TrySetFloatValue(Field f)
 {
     try
     {
         f.SetSingleValue(float.MaxValue);
         Assert.Fail();
     }
     catch (Exception expected) when(expected.IsIllegalArgumentException())
     {
         // expected
     }
 }
Ejemplo n.º 2
0
        private void TrySetFloatValue(Field f)
        {
            try
            {
                f.SetSingleValue(float.MaxValue);
                Assert.Fail();
            }
#pragma warning disable 168
            catch (System.ArgumentException expected)
#pragma warning restore 168
            {
                // expected
            }
        }