FormatException Class
The exception that is thrown when the format of an argument does not meet the parameter specifications of the invoked method.
For a list of all members of this type, see FormatException Members.
System.Object
System.Exception
System.SystemException
System.FormatException
System.Net.CookieException
System.Reflection.CustomAttributeFormatException
System.UriFormatException
[Visual Basic] <Serializable> Public Class FormatException Inherits SystemException [C#] [Serializable] public class FormatException : SystemException [C++] [Serializable] public __gc class FormatException : public SystemException [JScript] public Serializable class FormatException extends SystemException
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
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. 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.
FormatException uses the HRESULT COR_E_FORMAT, which has the value 0x80131537.
For a list of initial property values for an instance of FormatException, see the FormatException constructors.
Requirements
Namespace: System
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
Assembly: Mscorlib (in Mscorlib.dll)
See Also
FormatException Members | System Namespace | Exception | Handling and Throwing Exceptions