CSharp examples for Custom Type:Exception
Throwing a predefined exception.
using System;//from w w w. ja v a 2 s . c o m class Zero { public static void Main() { Console.WriteLine("Before Exception..."); throw( new DivideByZeroException() ); Console.WriteLine("After Exception..."); } }