Initializes a new instance of COMException with a specified message and error code.
[Visual Basic] Overloads Public Sub New( _ ByVal message As String, _ ByVal errorCode As Integer _ ) [C#] public COMException( string message, int errorCode ); [C++] public: COMException( String* message, int errorCode ); [JScript] public function COMException( message : String, errorCode : int );
This COMException constructor sets the base message witht the error code.
The errorCode parameter that is set the by this constructor. (For more information, see Int32).
COMException inherits from Exception. This constructor sets the properties of the Exception object as follows:
Property | Value |
---|---|
InnerException | a null reference (in Visual Basic Nothing) |
Message | message |
COMException Class | COMException Members | System.Runtime.InteropServices Namespace | COMException Constructor Overload List