แก้ไข

แชร์ผ่าน


MalformedLineException Constructors

Definition

Initializes a new instance of the MalformedLineException class.

Overloads

MalformedLineException()

Initializes a new instance of the MalformedLineException class.

MalformedLineException(String)

Initializes a new instance of the MalformedLineException class with a specified error message.

MalformedLineException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the MalformedLineException class with serialized data.

MalformedLineException(String, Exception)

Initializes a new instance of the MalformedLineException class with a specified error message and a reference to the inner exception that is the cause of this exception.

MalformedLineException(String, Int64)

Initializes a new instance of the MalformedLineException class with a specified error message and a line number.

MalformedLineException(String, Int64, Exception)

Initializes a new instance of the MalformedLineException class with a specified error message, a line number, and a reference to the inner exception that is the cause of this exception.

MalformedLineException()

Source:
MalformedLineException.vb
Source:
MalformedLineException.vb
Source:
MalformedLineException.vb

Initializes a new instance of the MalformedLineException class.

public:
 MalformedLineException();
public MalformedLineException ();
Public Sub New ()

Remarks

The exception indicates that the ReadFields method cannot parse a row using the specified format.

The following table shows the initial property values for an instance of MalformedLineException.

Property Value
InnerException A null reference (Nothing in Visual Basic).
Message The localized error message string.

See also

Applies to

MalformedLineException(String)

Source:
MalformedLineException.vb
Source:
MalformedLineException.vb
Source:
MalformedLineException.vb

Initializes a new instance of the MalformedLineException class with a specified error message.

public:
 MalformedLineException(System::String ^ message);
public MalformedLineException (string? message);
public MalformedLineException (string message);
new Microsoft.VisualBasic.FileIO.MalformedLineException : string -> Microsoft.VisualBasic.FileIO.MalformedLineException
Public Sub New (message As String)

Parameters

message
String

A message that describes the error.

Remarks

The content of the message parameter 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.

MalformedLineException inherits from the Exception class. This constructor sets the properties of the Exception object as shown in the following table.

Property Value
InnerException A null reference (Nothing in Visual Basic)
Message The message string.

Applies to

MalformedLineException(SerializationInfo, StreamingContext)

Source:
MalformedLineException.vb
Source:
MalformedLineException.vb
Source:
MalformedLineException.vb

Caution

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

Initializes a new instance of the MalformedLineException class with serialized data.

protected:
 MalformedLineException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected MalformedLineException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected MalformedLineException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new Microsoft.VisualBasic.FileIO.MalformedLineException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.VisualBasic.FileIO.MalformedLineException
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new Microsoft.VisualBasic.FileIO.MalformedLineException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.VisualBasic.FileIO.MalformedLineException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The SerializationInfo object that holds the serialized object data about the exception being thrown.

context
StreamingContext

The StreamingContext structure that contains contextual information about the source or destination.

Attributes

Remarks

This constructor is called during deserialization to reconstitute the exception object transmitted over a stream.

Applies to

MalformedLineException(String, Exception)

Source:
MalformedLineException.vb
Source:
MalformedLineException.vb
Source:
MalformedLineException.vb

Initializes a new instance of the MalformedLineException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public:
 MalformedLineException(System::String ^ message, Exception ^ innerException);
public MalformedLineException (string? message, Exception? innerException);
public MalformedLineException (string message, Exception innerException);
new Microsoft.VisualBasic.FileIO.MalformedLineException : string * Exception -> Microsoft.VisualBasic.FileIO.MalformedLineException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String

A String describing the error.

innerException
Exception

The Exception object that is the cause of the current exception. If the InnerException parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception.

Remarks

The content of the message parameter 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.

An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or a null reference if the InnerException property does not supply the inner exception value to the constructor.

The following table shows the initial property values for an instance of ApplicationException.

Property Value
InnerException The innerException reference.
Message The message string.

Applies to

MalformedLineException(String, Int64)

Source:
MalformedLineException.vb
Source:
MalformedLineException.vb
Source:
MalformedLineException.vb

Initializes a new instance of the MalformedLineException class with a specified error message and a line number.

public:
 MalformedLineException(System::String ^ message, long lineNumber);
public MalformedLineException (string? message, long lineNumber);
public MalformedLineException (string message, long lineNumber);
new Microsoft.VisualBasic.FileIO.MalformedLineException : string * int64 -> Microsoft.VisualBasic.FileIO.MalformedLineException
Public Sub New (message As String, lineNumber As Long)

Parameters

message
String

The message for the exception.

lineNumber
Int64

The line number of the malformed line.

Remarks

The content of the message parameter 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. The lineNumber parameter initializes the LineNumber property.

MalformedLineException inherits from the Exception. This constructor sets the properties of the Exception object as shown in the following table.

Property Value
InnerException A null reference (Nothing in Visual Basic)
Message The message string.

Applies to

MalformedLineException(String, Int64, Exception)

Source:
MalformedLineException.vb
Source:
MalformedLineException.vb
Source:
MalformedLineException.vb

Initializes a new instance of the MalformedLineException class with a specified error message, a line number, and a reference to the inner exception that is the cause of this exception.

public:
 MalformedLineException(System::String ^ message, long lineNumber, Exception ^ innerException);
public MalformedLineException (string? message, long lineNumber, Exception? innerException);
public MalformedLineException (string message, long lineNumber, Exception innerException);
new Microsoft.VisualBasic.FileIO.MalformedLineException : string * int64 * Exception -> Microsoft.VisualBasic.FileIO.MalformedLineException
Public Sub New (message As String, lineNumber As Long, innerException As Exception)

Parameters

message
String

The message for the exception.

lineNumber
Int64

The line number of the malformed line.

innerException
Exception

The Exception that is the cause of the current exception. If the InnerException parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception.

Remarks

The content of the message parameter 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. The lineNumber parameter initializes the LineNumber property.

An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or a null reference if the InnerException property does not supply the inner exception value to the constructor.

The following table shows the initial property values for an instance of ApplicationException.

Property Value
InnerException The innerException reference.
Message The message string.

Applies to