Predefined Exception « Language Basics « C# / CSharp Tutorial






1.23.Predefined Exception
1.23.1.Use the NullReferenceException.
1.23.2.Throwing Exceptions: ArgumentNullException
1.23.3.Handle ArgumentOutOfRangeException
1.23.4.Check OverflowException for long
1.23.5.Generate an index out-of-bounds exception
1.23.6.Define exception variable in catch statement: DivideByZeroException