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
axasxasd
Pot
ByVal
an attempt at making a usable code thing (failed lol)
Basic
SMS filter config Captures and Groups
learning1
Fórum ➡ Using Regex to insert "item" tags into the unique "list" tag of an XML data ♦
Delegate Example
Call Class Methods with Interface