throw Summary Throws a user-defined exception. Syntax throw object; Parameters object The exception object to throw. Description The throw statement will throw an exception you specify. Examples Basic Usage 12345678910import System; int add(int a, int b) { if (a >= 0 && b >= 0) { return a + b; } else { throw new Exceptions.OutOfRangeException("'add' expects two positive integers."); }} See Also System.Exception System.Exceptions try/catch/finally Share HTML | BBCode | Direct Link