Leadtools TWAIN (Leadtools.Twain assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
TwainException Constructor(String,TwainExceptionCode)
See Also 
Leadtools.Twain Namespace > TwainException Class > TwainException Constructor : TwainException Constructor(String,TwainExceptionCode)



message
A System.String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
code
An TwainExceptionCode that specifies what caused this exception.
Initializes a new instance of the TwainException class with its Message string set to message, its Code set to code and its inner exception set to a null reference (Nothing in Visual Basic).

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal message As String, _
   ByVal code As TwainExceptionCode _
)
Visual Basic (Usage)Copy Code
Dim message As String
Dim code As TwainExceptionCode
 
Dim instance As New TwainException(message, code)
C# 
public TwainException( 
   string message,
   TwainExceptionCode code
)
C++/CLI 
public:
TwainException( 
   String^ message,
   TwainExceptionCode code
)

Parameters

message
A System.String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
code
An TwainExceptionCode that specifies what caused this exception.

Remarks

The constructor initializes the Message property of the new instance using message and the Code property of the new instance using code.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also