Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
User Defined Exception (Inherited from built-in Exception class)
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { class Error : Exception { string errMsg; public Error() { } public Error(string msg) : base(msg) { } public void showError() { errMsg = Message; Console.WriteLine("Error:" + errMsg); } } public class Program { public static void Main(string[] args) { try { int a=5; int b=0; int c=a/b; Console.WriteLine("Division : " + c); }catch { Error er = new Error("Division not possible"); er.showError(); } } } }
run
|
edit
|
history
|
help
0
852
Fibonacci and finding nth fibo number
Class Objects
Write a program to sort given array using bubble sort.
regex
Reverse String in for loop
RNJHEFDSS VASX
temp_with_pow
Math 10.93 added fracOp
Swap adjacent Elements