Examples The following example demonstrates how to throw and catch an ArgumentException. It uses the ArgumentException.GetType().Name property to display the name of the exception object, and also uses the Message property to display the text of the exception message.