87 instantiations of DivideByZeroException
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (3)
MiddlewareTests.cs (3)
56throw new DivideByZeroException(); 115throw new DivideByZeroException(); 150throw new DivideByZeroException();
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
CommonResourceInvokerTest.cs (1)
18protected static readonly Exception Exception = new DivideByZeroException();
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
CacheTagHelperTest.cs (1)
849var expected = new DivideByZeroException();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
CommandLineRunnerTests.cs (2)
183var exception = new DivideByZeroException(); 212var exception = new DivideByZeroException();
Microsoft.DotNet.XUnitAssert.Tests (32)
AsyncCollectionAssertsTests.cs (6)
894 throw new DivideByZeroException(); 1040 validateError(() => Assert.Equal(expected, actual, (int e, int a) => throw new DivideByZeroException()), "int[] ", "<generated> "); 1041 validateError(() => Assert.Equal(expected.ToAsyncEnumerable(), actual, (int e, int a) => throw new DivideByZeroException()), "", ""); 1253 throw new DivideByZeroException(); 1373 validateError(() => Assert.NotEqual(expected, actual, (int e, int a) => throw new DivideByZeroException()), "int[] ", "<generated> "); 1374 validateError(() => Assert.NotEqual(expected.ToAsyncEnumerable(), actual, (int e, int a) => throw new DivideByZeroException()), "", "");
CollectionAssertsTests.cs (4)
1124 throw new DivideByZeroException(); 1232 (int e, int a) => throw new DivideByZeroException() 1824 throw new DivideByZeroException(); 1907 (int e, int a) => throw new DivideByZeroException()
EqualityAssertsTests.cs (10)
121 throw new DivideByZeroException(); 144 throw new DivideByZeroException(); 181 var ex = Record.Exception(() => Assert.Equal(42, 2112, (e, a) => throw new DivideByZeroException())); 200 (IEnumerable<int> e, IEnumerable<int> a) => throw new DivideByZeroException() 2405 throw new DivideByZeroException(); 2428 throw new DivideByZeroException(); 2451 throw new DivideByZeroException(); 2488 var ex = Record.Exception(() => Assert.NotEqual(42, 42, (e, a) => throw new DivideByZeroException())); 2507 (IEnumerable<int> e, IEnumerable<int> a) => throw new DivideByZeroException() 2524 var ex = Record.Exception(() => Assert.NotEqual("42", "42", (e, a) => throw new DivideByZeroException()));
ExceptionAssertsTests.cs (11)
49 var thrown = new DivideByZeroException(); 132 var thrown = new DivideByZeroException(); 205 var thrown = new DivideByZeroException(); 285 var thrown = new DivideByZeroException(); 374 var thrown = new DivideByZeroException(); 460 var thrown = new DivideByZeroException(); 532 var thrown = new DivideByZeroException(); 602 var thrown = new DivideByZeroException(); 662 var thrown = new DivideByZeroException(); 721 var thrown = new DivideByZeroException(); 807 var thrown = new DivideByZeroException();
Sdk\ArgumentFormatterTests.cs (1)
196 taskCompletionSource.SetException(new DivideByZeroException());
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
242Return New DivideByZeroException(Description)
System.Data.Common (12)
System\Data\SQLTypes\SQLByte.cs (2)
141throw new DivideByZeroException(SQLResource.DivideByZeroMessage); 154throw new DivideByZeroException(SQLResource.DivideByZeroMessage);
System\Data\SQLTypes\SQLDecimal.cs (2)
1678throw new DivideByZeroException(SQLResource.DivideByZeroMessage); 2221throw new DivideByZeroException(SQLResource.DivideByZeroMessage);
System\Data\SQLTypes\SQLDouble.cs (1)
147throw new DivideByZeroException(SQLResource.DivideByZeroMessage);
System\Data\SQLTypes\SQLInt16.cs (2)
148throw new DivideByZeroException(SQLResource.DivideByZeroMessage); 164throw new DivideByZeroException(SQLResource.DivideByZeroMessage);
System\Data\SQLTypes\SQLInt32.cs (2)
150throw new DivideByZeroException(SQLResource.DivideByZeroMessage); 166throw new DivideByZeroException(SQLResource.DivideByZeroMessage);
System\Data\SQLTypes\SQLInt64.cs (2)
200throw new DivideByZeroException(SQLResource.DivideByZeroMessage); 216throw new DivideByZeroException(SQLResource.DivideByZeroMessage);
System\Data\SQLTypes\SQLSingle.cs (1)
148throw new DivideByZeroException(SQLResource.DivideByZeroMessage);
System.Private.CoreLib (5)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (1)
322ExceptionIDs.DivideByZero => new DivideByZeroException(),
src\libraries\System.Private.CoreLib\src\Internal\Runtime\CompilerHelpers\ThrowHelpers.cs (1)
39throw new DivideByZeroException();
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (2)
1955throw new DivideByZeroException(); 2210throw new DivideByZeroException();
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (1)
506throw new DivideByZeroException();
System.Windows.Forms.Design.Tests (6)
System\ComponentModel\Design\CollectionFormTests.cs (1)
401DivideByZeroException exception = new();
System\ComponentModel\Design\ComponentDesignerTests.cs (2)
1199yield return new object[] { new DivideByZeroException() }; 1482yield return new object[] { new DivideByZeroException() };
System\ComponentModel\Design\DesignerHostTests.cs (1)
3232throw new DivideByZeroException();
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (1)
619.Throws(new DivideByZeroException());
System\ComponentModel\Design\SiteNestedContainerTests.cs (1)
1099throw new DivideByZeroException();
System.Windows.Forms.Tests (12)
System\Windows\Forms\BindingSourceTests.cs (1)
914throw new DivideByZeroException();
System\Windows\Forms\ControlTests.Handlers.cs (2)
4654throw new DivideByZeroException(); 4715throw new DivideByZeroException();
System\Windows\Forms\ControlTests.Methods.cs (8)
3794throw new DivideByZeroException(); 3820throw new DivideByZeroException(); 3863throw new DivideByZeroException(); 3932throw new DivideByZeroException(); 4012throw new DivideByZeroException(); 4053throw new DivideByZeroException(); 4074throw new DivideByZeroException(); 4125throw new DivideByZeroException();
System\Windows\Forms\ListBindingHelperTests.cs (1)
628throw new DivideByZeroException();
System.Xaml.Tests (10)
System\Xaml\XamlBackgroundReaderTests.cs (1)
187public override bool Read() => throw new DivideByZeroException();
System\Xaml\XamlDuplicateMemberExceptionTests.cs (1)
64yield return new object?[] { "message", new DivideByZeroException(), 0, 0 };
System\Xaml\XamlExceptionTests.cs (2)
38yield return new object?[] { "message", new DivideByZeroException(), -1, -2 }; 56yield return new object?[] { "message", new DivideByZeroException(), 0, 0 };
System\Xaml\XamlInternalExceptionTests.cs (1)
36yield return new object?[] { "message", new DivideByZeroException(), 0, 0 };
System\Xaml\XamlObjectReaderExceptionTests.cs (1)
36yield return new object?[] { "message", new DivideByZeroException(), 0, 0 };
System\Xaml\XamlObjectWriterExceptionTests.cs (1)
36yield return new object?[] { "message", new DivideByZeroException(), 0, 0 };
System\Xaml\XamlParseExceptionTests.cs (1)
36yield return new object?[] { "message", new DivideByZeroException(), 0, 0 };
System\Xaml\XamlSchemaExceptionTests.cs (1)
36yield return new object?[] { "message", new DivideByZeroException(), 0, 0 };
System\Xaml\XamlXmlWriterExceptionTests.cs (1)
36yield return new object?[] { "message", new DivideByZeroException(), 0, 0 };
ThrowingLibrary (1)
Thrower.cs (1)
17throw new DivideByZeroException();
WindowsBase.Tests (1)
System\Security\RightsManagement\RightsManagementExceptionTests.cs (1)
214info.AddValue("InnerException", new DivideByZeroException());
82 references to DivideByZeroException
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (2)
MiddlewareTests.cs (2)
119await Assert.ThrowsAsync<DivideByZeroException>(() => middleware.Invoke(new DefaultHttpContext())).DefaultTimeout(); 164await Assert.ThrowsAsync<DivideByZeroException>(() => middleware.Invoke(context)).DefaultTimeout();
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (4)
ApiResponseTypeProviderTest.cs (4)
490new ProducesResponseTypeAttribute(typeof(DivideByZeroException), 415), 491new ProducesDefaultResponseTypeAttribute(typeof(DivideByZeroException)), 506Assert.Equal(typeof(DivideByZeroException), responseType.Type); 523Assert.Equal(typeof(DivideByZeroException), responseType.Type);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (3)
CacheTagHelperTest.cs (3)
849var expected = new DivideByZeroException(); 878await Assert.ThrowsAsync<DivideByZeroException>(() => task1); 879await Assert.ThrowsAsync<DivideByZeroException>(() => task2);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
CommandLineRunnerTests.cs (2)
183var exception = new DivideByZeroException(); 212var exception = new DivideByZeroException();
Microsoft.DotNet.XUnitAssert.Tests (29)
AsyncCollectionAssertsTests.cs (4)
884 Assert.IsType<DivideByZeroException>(ex.InnerException); 1037 Assert.IsType<DivideByZeroException>(ex.InnerException); 1243 Assert.IsType<DivideByZeroException>(ex.InnerException); 1370 Assert.IsType<DivideByZeroException>(ex.InnerException);
CollectionAssertsTests.cs (4)
1118 Assert.IsType<DivideByZeroException>(ex.InnerException); 1245 Assert.IsType<DivideByZeroException>(ex.InnerException); 1818 Assert.IsType<DivideByZeroException>(ex.InnerException); 1920 Assert.IsType<DivideByZeroException>(ex.InnerException);
EqualityAssertsTests.cs (10)
115 Assert.IsType<DivideByZeroException>(ex.InnerException); 138 Assert.IsType<DivideByZeroException>(ex.InnerException); 190 Assert.IsType<DivideByZeroException>(ex.InnerException); 211 Assert.IsType<DivideByZeroException>(ex.InnerException); 2399 Assert.IsType<DivideByZeroException>(ex.InnerException); 2422 Assert.IsType<DivideByZeroException>(ex.InnerException); 2445 Assert.IsType<DivideByZeroException>(ex.InnerException); 2497 Assert.IsType<DivideByZeroException>(ex.InnerException); 2518 Assert.IsType<DivideByZeroException>(ex.InnerException); 2533 Assert.IsType<DivideByZeroException>(ex.InnerException);
ExceptionAssertsTests.cs (11)
49 var thrown = new DivideByZeroException(); 132 var thrown = new DivideByZeroException(); 205 var thrown = new DivideByZeroException(); 285 var thrown = new DivideByZeroException(); 374 var thrown = new DivideByZeroException(); 460 var thrown = new DivideByZeroException(); 532 var thrown = new DivideByZeroException(); 602 var thrown = new DivideByZeroException(); 662 var thrown = new DivideByZeroException(); 721 var thrown = new DivideByZeroException(); 807 var thrown = new DivideByZeroException();
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
217[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.DivideByZeroException))]
netstandard (1)
netstandard.cs (1)
742[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.DivideByZeroException))]
System.Numerics.Tensors (13)
System\Numerics\Tensors\netcore\TensorPrimitives.Divide.cs (3)
17/// <exception cref="DivideByZeroException"><typeparamref name="T"/> is an integer type and an element in <paramref name="y"/> is equal to zero.</exception> 36/// <exception cref="DivideByZeroException"><typeparamref name="T"/> is an integer type and <paramref name="y"/> is equal to zero.</exception> 55/// <exception cref="DivideByZeroException"><typeparamref name="T"/> is an integer type and an element in <paramref name="y"/> is equal to zero.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.DivRem.cs (3)
20/// <exception cref="DivideByZeroException"><typeparamref name="T"/> is an integer type and an element in <paramref name="y"/> is equal to zero.</exception> 42/// <exception cref="DivideByZeroException"><typeparamref name="T"/> is an integer type and <paramref name="y"/> is equal to zero.</exception> 64/// <exception cref="DivideByZeroException"><typeparamref name="T"/> is an integer type and an element in <paramref name="y"/> is equal to zero.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Reciprocal.cs (4)
17/// <exception cref="DivideByZeroException"><typeparamref name="T"/> is an integer type and an element in <paramref name="x"/> is equal to zero.</exception> 32/// <exception cref="DivideByZeroException"><typeparamref name="T"/> is an integer type and an element in <paramref name="x"/> is equal to zero.</exception> 47/// <exception cref="DivideByZeroException"><typeparamref name="T"/> is an integer type and an element in <paramref name="x"/> is equal to zero.</exception> 62/// <exception cref="DivideByZeroException"><typeparamref name="T"/> is an integer type and an element in <paramref name="x"/> is equal to zero.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Remainder.cs (3)
17/// <exception cref="DivideByZeroException"><typeparamref name="T"/> is an integer type and an element in <paramref name="y"/> is equal to zero.</exception> 36/// <exception cref="DivideByZeroException"><typeparamref name="T"/> is an integer type and <paramref name="y"/> is equal to zero.</exception> 55/// <exception cref="DivideByZeroException"><typeparamref name="T"/> is an integer type and an element in <paramref name="y"/> is equal to zero.</exception>
System.Private.Xml (1)
System\Xml\Xsl\IlGen\XmlILOptimizerVisitor.cs (1)
5567catch (DivideByZeroException)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
174[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.DivideByZeroException))]
System.Windows.Forms.Design.Tests (6)
System\ComponentModel\Design\CollectionFormTests.cs (1)
401DivideByZeroException exception = new();
System\ComponentModel\Design\DesignerHostTests.cs (2)
1690Assert.Throws<DivideByZeroException>(() => host.Container.Add(component)); 1694Assert.Throws<DivideByZeroException>(() => host.Container.Add(component, "name"));
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (1)
627Assert.Throws<DivideByZeroException>(store.Close);
System\ComponentModel\Design\SiteNestedContainerTests.cs (2)
609Assert.Throws<DivideByZeroException>(() => container.Add(component)); 613Assert.Throws<DivideByZeroException>(() => container.Add(component, "name"));
System.Windows.Forms.Tests (18)
System\Windows\Forms\ControlTests.Handlers.cs (2)
4660Assert.Throws<DivideByZeroException>(() => control.OnPrint(eventArgs)); 4728Assert.Throws<DivideByZeroException>(() => control.OnPrint(eventArgs));
System\Windows\Forms\ControlTests.Methods.cs (16)
3796Assert.Throws<DivideByZeroException>(() => control.Invoke(method)); 3824Assert.Throws<DivideByZeroException>(() => control.Invoke(method)); 3839DivideByZeroException exception = Assert.Throws<DivideByZeroException>(() => control.Invoke(() => FaultingMethod())); 3873DivideByZeroException exception = Assert.Throws<DivideByZeroException>(() => 3909DivideByZeroException exception = Assert.Throws<DivideByZeroException>(() => control.Invoke((MethodInvoker)FaultingMethod)); 3942DivideByZeroException exception = Assert.Throws<DivideByZeroException>(() => 4014Assert.Throws<DivideByZeroException>(() => control.Invoke(method, [1])); 4028var exception = Assert.Throws<DivideByZeroException>(() => control.Invoke((MethodInvoker)FaultingMethod)); 4078Assert.Throws<DivideByZeroException>(() => control.Invoke(method, [1])); 4095var exception = Assert.Throws<DivideByZeroException>(() => control.Invoke((MethodInvoker)FaultingMethod));
System.Xaml.Tests (1)
System\Xaml\XamlBackgroundReaderTests.cs (1)
178Assert.Throws<DivideByZeroException>(() => reader.Read());