Represents an exception that is thrown when the format of an argument does not match the contract of its method.
Object
Exception
SystemException
FormatException
[Visual Basic] Public Class FormatException Inherits SystemException [C#] public class FormatException : SystemException [C++] public __gc class FormatException : public SystemException [JScript] public class FormatException extends SystemException
For example, a method may have a parameter of type String that is required to consist of a single digit followed by a period that is followed by a single digit. Passing the method a string that contains merely two digits would cause a FormatException to be thrown.
Namespace: System
Assembly: mscorlib.dll