Class FormatException
- Namespace
- System
- Assembly
- mscorlib.dll
The exception that is thrown for invalid casting or explicit conversion.
public class FormatException : SystemException
- Inheritance
-
FormatException
- Inherited Members
- Extension Methods
Constructors
FormatException()
Initializes a new instance of the FormatException class.
public FormatException()
FormatException(string)
Initializes a new instance of the FormatException class with a specified error message.
public FormatException(string message)
Parameters
messagestringThe message that describes the error.
FormatException(string, Exception)
Initializes a new instance of the FormatException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public FormatException(string message, Exception innerException)
Parameters
messagestringThe error message that explains the reason for the exception.
innerExceptionExceptionThe exception that is the cause of the current exception. If the innerException parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception.