MalformedLineException 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 MalformedLineException 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| MalformedLineException() |
初始化 MalformedLineException 类的新实例。 |
| MalformedLineException(String) |
使用指定的错误消息初始化类的新实例 MalformedLineException 。 |
| MalformedLineException(SerializationInfo, StreamingContext) |
已过时.
使用序列化数据初始化类的新实例 MalformedLineException 。 |
| MalformedLineException(String, Exception) |
使用指定的错误消息和对作为此异常原因的内部异常的引用初始化类的新实例 MalformedLineException 。 |
| MalformedLineException(String, Int64) |
使用指定的错误消息和行号初始化类的新实例 MalformedLineException 。 |
| MalformedLineException(String, Int64, Exception) |
使用指定的错误消息、行号和对作为此异常原因的内部异常的引用初始化类的新实例 MalformedLineException 。 |
MalformedLineException()
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
初始化 MalformedLineException 类的新实例。
public:
MalformedLineException();
public MalformedLineException();
Public Sub New ()
注解
异常指示 ReadFields 该方法无法使用指定的格式分析行。
下表显示了实例 MalformedLineException的初始属性值。
| 财产 | 价值 |
|---|---|
| InnerException | Null 引用(Nothing 在 Visual Basic 中)。 |
| Message | 本地化的错误消息字符串。 |
另请参阅
适用于
MalformedLineException(String)
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
使用指定的错误消息初始化类的新实例 MalformedLineException 。
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)
参数
- message
- String
描述错误的消息。
注解
参数的内容 message 旨在由人类理解。 此构造函数的调用方必须确保此字符串已本地化为当前系统区域性。
MalformedLineException 继承自 Exception 类。 此构造函数设置对象的属性 Exception ,如下表所示。
| 财产 | 价值 |
|---|---|
| InnerException | 空引用(Nothing 在 Visual Basic 中) |
| Message | 字符串 message 。 |
适用于
MalformedLineException(SerializationInfo, StreamingContext)
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
注意
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
使用序列化数据初始化类的新实例 MalformedLineException 。
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);
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}")>]
new Microsoft.VisualBasic.FileIO.MalformedLineException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.VisualBasic.FileIO.MalformedLineException
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)
参数
- info
- SerializationInfo
保存 SerializationInfo 所引发异常的序列化对象数据的对象。
- context
- StreamingContext
StreamingContext包含有关源或目标的上下文信息的结构。
- 属性
注解
在反序列化期间调用此构造函数以重新构造通过流传输的异常对象。
适用于
MalformedLineException(String, Exception)
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
使用指定的错误消息和对作为此异常原因的内部异常的引用初始化类的新实例 MalformedLineException 。
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)
参数
- innerException
- Exception
是 Exception 当前异常原因的对象。
InnerException如果参数不是 null 引用(Nothing在 Visual Basic 中),则当前异常在处理内部异常的 catch 块中引发。
注解
参数的内容 message 旨在由人类理解。 此构造函数的调用方必须确保此字符串已本地化为当前系统区域性。
作为上一个异常的直接结果引发的异常应包含对属性中上一异常的 InnerException 引用。 如果该属性未向构造函数提供内部异常值,则该 InnerException 属性将返回传递给构造函数的相同值,或 InnerException 返回 null 引用。
下表显示了实例 ApplicationException的初始属性值。
| 财产 | 价值 |
|---|---|
| InnerException | 引用 innerException 。 |
| Message | 字符串 message 。 |
适用于
MalformedLineException(String, Int64)
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
使用指定的错误消息和行号初始化类的新实例 MalformedLineException 。
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)
参数
- message
- String
异常的消息。
- lineNumber
- Int64
格式不正确的行的行号。
注解
参数的内容 message 旨在由人类理解。 此构造函数的调用方必须确保此字符串已本地化为当前系统区域性。 参数 lineNumber 初始化 LineNumber 属性。
MalformedLineException继承自 .Exception 此构造函数设置对象的属性 Exception ,如下表所示。
| 财产 | 价值 |
|---|---|
| InnerException | 空引用(Nothing 在 Visual Basic 中) |
| Message | 字符串 message 。 |
适用于
MalformedLineException(String, Int64, Exception)
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
- Source:
- MalformedLineException.vb
使用指定的错误消息、行号和对作为此异常原因的内部异常的引用初始化类的新实例 MalformedLineException 。
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)
参数
- message
- String
异常的消息。
- lineNumber
- Int64
格式不正确的行的行号。
- innerException
- Exception
这是 Exception 当前异常的原因。
InnerException如果参数不是 null 引用(Nothing在 Visual Basic 中),则当前异常在处理内部异常的 catch 块中引发。
注解
参数的内容 message 旨在由人类理解。 此构造函数的调用方必须确保此字符串已本地化为当前系统区域性。 参数 lineNumber 初始化 LineNumber 属性。
作为上一个异常的直接结果引发的异常应包含对属性中上一异常的 InnerException 引用。 如果该属性未向构造函数提供内部异常值,则该 InnerException 属性将返回传递给构造函数的相同值,或 InnerException 返回 null 引用。
下表显示了实例 ApplicationException的初始属性值。
| 财产 | 价值 |
|---|---|
| InnerException | 引用 innerException 。 |
| Message | 字符串 message 。 |