OPC Studio User's Guide and Reference
SimulatedCOMException Constructor(String,Int32)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Runtime.InteropServices Namespace > SimulatedCOMException Class > SimulatedCOMException Constructor : SimulatedCOMException Constructor(String,Int32)
The message that indicates the reason the exception occurred.

The value of this parameter cannot be null (Nothing in Visual Basic).

The error code (HRESULT) value associated with this exception.
Initializes a new instance of the class with a specified message and error code.
Syntax
'Declaration
 
Public Function New( _
   ByVal message As String, _
   ByVal errorCode As Integer _
)
'Usage
 
Dim message As String
Dim errorCode As Integer
 
Dim instance As New SimulatedCOMException(message, errorCode)
public SimulatedCOMException( 
   string message,
   int errorCode
)
public:
SimulatedCOMException( 
   String^ message,
   int errorCode
)

Parameters

message
The message that indicates the reason the exception occurred.

The value of this parameter cannot be null (Nothing in Visual Basic).

errorCode
The error code (HRESULT) value associated with this exception.
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also