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
初始化 MalformedLineException 类的新实例。
public:
 MalformedLineException();public MalformedLineException ();Public Sub New ()注解
异常指示 ReadFields 方法不能使用指定格式分析行。
下表显示了 MalformedLineException 实例的初始属性值。
| properties | 值 | 
|---|---|
| InnerException | 空引用(在 Visual Basic 中为 Nothing)。 | 
| Message | 本地化的错误消息字符串。 | 
另请参阅
适用于
MalformedLineException(String)
- 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.MalformedLineExceptionPublic Sub New (message As String)参数
- message
- String
描述错误的消息。
注解
              message 参数的内容应为人所理解。 此构造函数的调用方需要确保此字符串已针对当前系统区域性进行了本地化。
MalformedLineException 继承自 Exception 类。 此构造函数设置 对象的属性 Exception ,如下表所示。
| properties | 值 | 
|---|---|
| InnerException | 空引用(在 Visual Basic 中为 Nothing) | 
| Message | 字符串 message。 | 
适用于
MalformedLineException(SerializationInfo, StreamingContext)
- 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);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.MalformedLineExceptionProtected 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
使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 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.MalformedLineExceptionPublic Sub New (message As String, innerException As Exception)参数
- innerException
- Exception
表示当前异常的产生原因的 Exception 对象。 如果 InnerException 参数不是空引用(在 Visual Basic 中为 Nothing),则在处理内部异常的 catch 块中引发当前异常。
注解
              message 参数的内容应为人所理解。 此构造函数的调用方需要确保此字符串已针对当前系统区域性进行了本地化。
因前一个异常而直接引发的异常应在 InnerException 属性中包含对前一个异常的引用。 InnerException属性将返回相同的值,如果传递到构造函数中,则为 null 引用InnerException属性不会提供给构造函数的内部异常值。
下表显示了 ApplicationException 实例的初始属性值。
| properties | 值 | 
|---|---|
| InnerException | 引用 innerException。 | 
| Message | 字符串 message。 | 
适用于
MalformedLineException(String, Int64)
- 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.MalformedLineExceptionPublic Sub New (message As String, lineNumber As Long)参数
- message
- String
异常消息。
- lineNumber
- Int64
格式错误的行的行号。
注解
              message 参数的内容应为人所理解。 此构造函数的调用方需要确保此字符串已针对当前系统区域性进行了本地化。 参数 lineNumber 初始化 LineNumber 属性。
MalformedLineException 继承自 Exception。 此构造函数设置 对象的属性 Exception ,如下表所示。
| properties | 值 | 
|---|---|
| InnerException | 空引用(在 Visual Basic 中为 Nothing) | 
| Message | 字符串 message。 | 
适用于
MalformedLineException(String, Int64, Exception)
- 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.MalformedLineExceptionPublic Sub New (message As String, lineNumber As Long, innerException As Exception)参数
- message
- String
异常消息。
- lineNumber
- Int64
格式错误的行的行号。
- innerException
- Exception
导致当前异常的 Exception。 如果 InnerException 参数不是空引用(在 Visual Basic 中为 Nothing),则在处理内部异常的 catch 块中引发当前异常。
注解
              message 参数的内容应为人所理解。 此构造函数的调用方需要确保此字符串已针对当前系统区域性进行了本地化。 参数 lineNumber 初始化 LineNumber 属性。
因前一个异常而直接引发的异常应在 InnerException 属性中包含对前一个异常的引用。 InnerException属性将返回相同的值,如果传递到构造函数中,则为 null 引用InnerException属性不会提供给构造函数的内部异常值。
下表显示了 ApplicationException 实例的初始属性值。
| properties | 值 | 
|---|---|
| InnerException | 引用 innerException。 | 
| Message | 字符串 message。 |