InvalidPrinterException 构造函数

定义

初始化 InvalidPrinterException 类的新实例。Initializes a new instance of the InvalidPrinterException class.

重载

InvalidPrinterException(PrinterSettings)

初始化 InvalidPrinterException 类的新实例。Initializes a new instance of the InvalidPrinterException class.

InvalidPrinterException(SerializationInfo, StreamingContext)

使用序列化数据初始化 InvalidPrinterException 类的新实例。Initializes a new instance of the InvalidPrinterException class with serialized data.

InvalidPrinterException(PrinterSettings)

初始化 InvalidPrinterException 类的新实例。Initializes a new instance of the InvalidPrinterException class.

public:
 InvalidPrinterException(System::Drawing::Printing::PrinterSettings ^ settings);
public InvalidPrinterException (System.Drawing.Printing.PrinterSettings settings);
new System.Drawing.Printing.InvalidPrinterException : System.Drawing.Printing.PrinterSettings -> System.Drawing.Printing.InvalidPrinterException
Public Sub New (settings As PrinterSettings)

参数

settings
PrinterSettings

指定打印机设置的 PrinterSettingsA PrinterSettings that specifies the settings for a printer.

InvalidPrinterException(SerializationInfo, StreamingContext)

使用序列化数据初始化 InvalidPrinterException 类的新实例。Initializes a new instance of the InvalidPrinterException class with serialized data.

protected:
 InvalidPrinterException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected InvalidPrinterException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Drawing.Printing.InvalidPrinterException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Drawing.Printing.InvalidPrinterException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

包含有关所引发异常的序列化对象数据的 SerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.

context
StreamingContext

StreamingContext,它包含关于源或目标的上下文信息。The StreamingContext that contains contextual information about the source or destination.

异常

infonullinfo is null.

类名为 nullHResult 为 0。The class name is null or HResult is 0.

注解

在反序列化期间调用此构造函数以重新构造在流上传输的异常对象。This constructor is called during deserialization to reconstitute the exception object transmitted over a stream.

另请参阅

适用于