C# DivideByZeroException
Program.cs
Output
kodingwindow@kw:~/csharp$ dotnet runUnhandled exception. System.DivideByZeroException: Attempted to divide by zero. at Program.<Main>$(String[] args) in /home/kodingwindow/csharp/Program.cs:line 2 kodingwindow@kw:~/csharp$
C# program to handle the DivideByZeroException
Program.cs
Output
kodingwindow@kw:~/csharp$ dotnet run Attempted to divide by zero. kodingwindow@kw:~/csharp$
What Next?
C# program to handle the IndexOutOfRangeException
C# program to handle the ArgumentException
C# program to handle the OutOfMemoryException
Advertisement