Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Infinity or Exception in C# when divide by 0?
Divide by zero is the System.DivideByZeroException, which is a class that handles errors generated from dividing a dividend with zero.
Let us see an example.
Example
result = num1 / num2;
Above, if num2 is set to 0, then the DivideByZeroException is caught since we have handled exception.
Advertisements
