Gets a string representation of the frames on the call stack at the time the current exception was thrown. Gets or sets the name of the application or the object that causes the error. Gets a message that describes the current exception. Gets the Exception instance that caused the current exception. Gets or sets a link to the help file associated with this 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. ctor(string message, Exception innerException) Initializes a new instance of the FormatException class with a specified error message. This constructor is called by derived class constructors to initialize state in this type. See also: System Namespace | Exception | MSDN: handlingthrowingexceptions System.FormatException Member List: Public Constructors ctor #1ĭefault constructor. For example, if a method specifies a String parameter consisting of two digits with an embedded period, passing a corresponding string argument containing only two digits to that method would cause FormatException to be thrown.įormatException uses the HRESULT COR_E_FORMAT, which has the value 0x80131537.įor a list of initial property values for an instance of FormatException, see the FormatException.#ctor constructors. Remarks FormatException is thrown when the format of an argument in a method invocation does not match the format of the corresponding formal parameter type. Public class FormatException : SystemException Summary The exception that is thrown when the format of an argument does not meet the parameter specifications of the invoked method. Type: System.FormatException System.FormatException Class Assembly: Mscorlib.dll